News for hackers. Stuff that matters.
Re:Responsive images by splitbrain on Saturday June 12, 2021 @08:52AM (#27484113)
One thing that's annoying about responsive images is that the displays with highest density are built into the devices with the potentially shittiest bandwidth.

So on a image heavy site, I might deliver 3x sized images (which may several megabytes) to an top generation iPhone in the middle of nowhere (like rural Germany) on a Edge connection...

I wish there was a CSS media query that would also consider the current network connection.

Re:Responsive images by Santosh83 on Saturday June 12, 2021 @09:00AM (#27484162)
<img> srcset with resolution descriptor is supposed to consider network speed when making a decision to download from a set of resolutions.
Re:Responsive images by darekkay on Saturday June 12, 2021 @12:41PM (#27485597)
There is a prefers-reduced-data media query draft [1] which addresses the issue. It doesn't actually check the bandwidth, though (although I believe there are options to put a mobile phone into "reduced data" mode below a certain bandwidth).

[1] https://developer.mozilla.org/en-US/docs/Web/CSS/@media/pref...

Re:Responsive images by Y-bar on Saturday June 12, 2021 @09:00AM (#27484166)
This!

But wasn't progressive JPEG and AVIF pretty much designed to alleviate this problem though? Webp does not seem to support progressive loading however.

Re:Responsive images by Nextgrid on Saturday June 12, 2021 @09:18AM (#27484290)
Progressive formats still require the device and network to allocate the bandwidth appropriately, so you'd want required traffic reaching the device first, and then images. The problem is that in most cases everything is just thrown more or less at once towards the device and then latency and packet loss goes through the roof and nothing loads.
Re:Responsive images by tjchear on Saturday June 12, 2021 @08:58AM (#27484153)
Or better yet, give client control over the reported media sizes, so they can ask for a lower quality but faster loading website if they want to.