Few days? Why?
Few days? Why?
It's the animated gifs that take forever because they have to be processed with gifsicle and then converted to mpeg-4.
Imgix does all of that. I don't know what kind of voodoo they are doing on the gif crop, but it's lightning fast.
And of course things didn't work 100%, since some of the originals had mysteriously disappeared or rotted away. Not to mention the on-going storage costs of these 51 copies of each image, the vast majority of which were never requested even a single time.
Another approach at a different company was to have thousands of EC2 instances running 24/7 to resize images as users uploaded them and another few thousand to handle the backlog that the first group couldn't get to within their time budget. It got the job done, but it was pretty expensive and time consuming to babysit.
Of course the best is to do something in the middle.
Middle is: You precompute some fixed presets(like him, lower latency) but also have the ability to generate on demand if a preset doesn't exist(used when adding new presets, no reason to wait *days to have the new preset).