Page MenuHomePhabricator

Extend the default srcset to 3x and 4x
Closed, DeclinedPublic


Why does MediaWiki not extend the srcset to 3x and 4x?

Most tutorials on the web for srcset recommend 1.5x, 2x, 3x, 4x.

Event Timeline

Restricted Application added a subscriber: Steinsplitter. · View Herald Transcript
brion added a subscriber: brion.

As you increase the resolution of image files, their bandwidth usage increases roughly according to the square. So, 4x image may require 16x the bandwidth of 1x image, unless you use lossy compression and decrease the quality significantly.

Of course it all depends -- but a very high-density image will have diminishing returns in terms of visible image quality, while increasing the bandwidth unnecessarily.

Note that we've removed the 1.5x and 2x images entirely on mobile views for bandwidth reasons, so adding 3x and 4x as a general rule is *extremely* unlikely.

Support webp then :)

Removing it completely is not so smart IMO. What about surfing mobile or on a tablet using wifi? Why should these be delivered with poor image quality?

My approach: Deliver all qualities we have, let the browser decide. If the browser is too dumb to make choices depending on current connection speed, so be it.

MarkTraceur triaged this task as Medium priority.Dec 5 2016, 4:15 PM
MarkTraceur moved this task from Untriaged to Tracking on the Multimedia board.
MarkTraceur moved this task from Tracking to Triaged on the Multimedia board.

The trend especially on mobile has been towards client-side code controlling image loading timing and -parameters. With current browsers, this approach is more powerful, as it can take factors like viewport, network speed & kind of connection into account.

Sure, we could also just skip that and wait for a much better solution in 5 years :P

Or we simply add 3x and 4x to existing core code. Seriously, where is the problem?

All images on thousands of MW wikis look blurry on 3x, 4x and 2x (with zoom) devices and we talk about theoretic cases like slow mobile speed as we have 2006.

@Subfader, the status quo is using JS, as srcset is not working with current browsers. We do not want to serve huge high-resolution images to mobile users with high resolution screens, but on poor network connections.

the status quo is using JS, srcset is not working with current browsers

I have nothing to add here anymore. Good bye MediaWiki!

MarkTraceur added a subscriber: MarkTraceur.

Based on lack of support or interest, closing this bug per @GWicke and @brion.