Hacker News new | ask | show | jobs
by vishnumohandas 845 days ago
Thanks for checking us out!

We currently keep 2 versions of a photo - one the original, and the other a downscaled copy to be rendered as the thumbnail.

Unlike non-e2ee providers, we cannot transcode and serve optimised images on the fly, when it's faster to downscale than serve the original image over network.

What we could do is

1. Intelligently preload original photos when their thumbnails are in scope

2. Store an extra version of the photo, whose resolution is between that of the thumbnail and the original, and perform #1 over those

Sorry about the flicker, will fix it.

1 comments

Ah this totally makes sense! Do you use progressive JPEGs already when opening the full image?

If only there was a progressive encoding which lets you get a perfectly downscaled (not blurry) version of an image by just reading parts of the file.

TIL about progressive JPEGs, will check it out, thanks!

We currently render the thumbnail first (in most cases it's available locally) and then replace it with the original image once fetched from remote, while replicating the zoom and pan operations (if any) performed by the user. So it is "progressive" in some sense, but goes from something like 20% to 100% in one shot.

("20%" is a simplification, the actual value will depend on the resolution of the original image and that of the generated thumbnail, the latter is fixed)