--- title: "Transferred 9M images for better privacy" tags: en, description: "HackMD shares their experience backing up 9 million Imgur images for user's privacy" image: "https://hackmd.io/_uploads/H1p5Mb6Bn.png" author: ann summary: | "After May 15th, if Imgur begins mass deletion of images, HackMD's paid users will not be impacted in any way." --- ## 9,000,000 images at risk With the recent announcement from Imgur regarding the implementation of updated terms of service effecting from May 15, 2023, a specific section directly affects HackMD and its users. According to the policy, low-traffic images uploaded by unregistered users and unused old images will gradually be removed. This policy change could potentially impact the users of HackMD who upload images to Imgur. HackMD has always prioritized user privacy, so our development team has swiftly transferred all user-uploaded images from Imgur to HackMD's cloud storage. This ensures that HackMD users will not be affected by any changes made by Imgur, preserving the wholeness of their original notes. **TL;DR: after May 15th, if Imgur begins mass deletion of images, HackMD's paid users will not be impacted in any way.** After Imgur's announcement, we received numerous inquiries and suggestions from users. Now, we invite HackMD's CTO, Max, to share their experience with the backup process. ## Mission: leave the notes intact HackMD is a small team that handles daily website maintenance and actively develops new features. Faced with unexpected challenges, the team must make quick decisions and execute them promptly, which is the greatest challenge in this situation. - **How did the HackMD team process such a large content volume in such a short time?** - ==Max:== HackMD boasts a well-organized team that handles routine maintenance and works on numerous ongoing projects. Faced with this sudden challenge, we needed to assess the scale of the problem quickly. Here are the steps we took. - Checked the system for any usage of Imgur uploads: - Images uploaded in notes - User-uploaded avatars - Team space logos - Counted the number of images that needed to be processed. - Identified the relevant implementation code and discussed it with the engineer familiar with it. - Carried out the migration in multiple stages: a. Extracted images and their associations from the notes. b. Transferred each image to HackMD's image space, note by note. c. Enabled all users to utilize HackMD's image space, avoiding future migrations. d. Provided automatic conversion of image URLs for paid users. e. Notified users who uploaded images to Imgur from HackMD that the migration was completed. - **Did you encounter any difficulties during the implementation?** - ==Max:== First and foremost, We had to process around 9 million Imgur images, amounting to 1.8TB of data, scattered across 1.27 million notes contributed by approximately 150,000 users and 10,000 teams. The challenge lay in transferring the images without change the note content, and it was indeed a significant challenge and difficulty. - **How did the HackMD team successfully overcome it?** - ==Max:== We considered allowing free users to continue using Imgur or switching to other services. However, there could still be future instances requiring another migration. We decided to grant all users access to HackMD's image space to safeguard user privacy, strengthening privacy measures for good. However, considering the immense number of images, the original estimate was that it would take a week to complete the transfer. After discussions, we opted for a parallel processing approach using AWS Lambda, running up to 15 jobs simultaneously, with a backup rate of approximately 50-100 images per second. Ultimately, it took three days to complete the migration. - **Some users suggested HackMD should have offered a paid plan for the transfer. Why did you decide to proceed with the migration directly?** - ==Max:== We cannot anticipate when users will subscribe or which images Imgur may remove. Many free users have shared valuable content publicly over an extended period. Therefore, we wanted to ensure that no images would be lost in any of the notes (excluding a small portion used for illegal purposes). We took a comprehensive approach during this process, transferring all images regardless of when they were uploaded. Users can check the total number of images they have completed the migration on the note settings page (Settings → Notes). ![](https://hackmd.io/_uploads/rkSAmWKBh.png) ## Join the journey to a better HackMD To enhance user experience, our team has been actively working on numerous feature updates and adjustments since last year. We have also interviewed various teams from the globe to gain further insights on how users work together. We are thrilled to announce that the new version of HackMD will be launched in the second half of this year, and those who are interested can get a sneak peek of the new interface through Preview features. Of course, the [Beta features](https://hackmd.io/settings#preview-features) are still in developing and undergoing continuous testing. If you encounter any issues or have suggestions, please feel free to give us feedback via support@hackmd.io or join the Discord server. ### Official Discord Server 📣 We are announcing the official launch of HackMD's Discord server 🎉  👉👉👉 [Click here to join](https://discord.gg/qTvkp6vdKV)