although in reality, you load profile picture once, you can save whatever quality variant of it in local storage.
if someone wants to waste your bandwidth, they can post single post with 100x 500 MB gifs anyway.
you could add soft recommendations of picture sizes in spec for all images, as well as bandwidth saving setting which prevents automatic loading of images past specified size.
also it could still be beneficial to have two image qualities for all image posts. often its not necessary to load 8K image in feed, but photographer may still want to publish original high quality image.
Login to reply
Replies (1)
It's not feasible to do any of this on a single client because another client can just ruin your day. You can implement compression and resizing just fine, but people can just share a link and it renders, or upload through another client.
You also can't really block large images because by the time you see it it already loaded. In some cases HTTP headers will solve this for you but in many instances you won't have this info at all.
You are right that you can cache things, and it's not an issue then, but this is an issue particularly on mobile connections and particularly on slow ones.
For slow connections though we can disable automatic loading of all media (as some clients have done).