As a content consumer
I want an appropriate version of a media asset
so that I can have quick page load times and experience the content as intended on my device.
So what about approaches that... are less recommended? Like letting a client dictate its own requirement?
How about fetching portions of an image client side without downloading the entire image? Apache supports a range request which can allow for portions of a file to be retrieved at a time- used in streaming as well as resuming downloads. Theoretically one could just request a smaller portion of an image with targeted requests. While this would only give you a subsection of a file it ought to be a lower file size. In order to only request the interior portion it's likely that multiple requests would have to be calculated to get the interior space and these results would have to be stitched together to form the smaller version. It might be possible to do this with a multipart/byte-range request though given the number of offsets needed I'm not sure that you could. If this is possible you could probably just interpolate the image with the HTTP request. That would be pretty neat.
Actually, this really isn't any kind of solution- it still requires content to have the EXIF data, it isn't well supported, and will only work with JPEG images (yes, PNG does have metadata but it seems to be less standardized than JPEG). It also requires two requests- though compared to downloading a 2mb file it could caries an advantage for mobile devices.
Nonetheless, I wrote a little proof of concept here: https://arthur24b6.github.io/barnsligipt/. It gets a list of files from Apache (or from Github's API) and tries to fetch thumbnail and other EXIF data from the files and of course is all done client side.