Page MenuHomePhabricator

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

Description

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

Subfader created this task.May 1 2016, 11:28 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 1 2016, 11:28 AM
Restricted Application added projects: Multimedia, Commons. · View Herald TranscriptMay 1 2016, 11:47 AM
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.

Restricted Application added subscribers: Poyekhali, Matanya. · View Herald TranscriptMay 1 2016, 12:41 PM
Subfader added a comment.EditedMay 1 2016, 2:29 PM

Support webp then :) https://phabricator.wikimedia.org/T27611

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 Normal 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 closed this task as Declined.Jun 5 2017, 3:23 PM
MarkTraceur added a subscriber: MarkTraceur.

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