Page MenuHomePhabricator

Wikipedia sends WebP thumbnails when Opera claims to support it but lies
Closed, ResolvedPublic

Description

I have recently noticed that many images and icons usually seen on Wikpedia articles became missing, which makes it much less readable.

It first, I thought it was an intermittent TLS problem, but it seemed to persist, even when I copied the seemingly-JPEG URL into a different window and/or do a clean refresh. The clue is only revealed when I right-clicked on it to show image properties: Wikimedia server returned thumbnail as WebP, which my browser (Opera 11.64) cannot read, despite the originally-uploaded image being a plain old JPEG file:

Screenshot (Article in the screenshot)

Google WebP requires a very new browser to view, just to gain marginal size advantage; while plain JPEG, PNG (or even GIF) are widely supported for more than a decade. Forcing WebP means making Wikipedia inaccessible to older installations.

Wikipedia is a free encyclopedia that is supposed to be accessible to anyone; including ones who have technology limitations, or simply opposes upgrade treadmill. It should not be treated as "business" decision.

Please investigate and fix.

Browser: Opera 11.64
U/A Identifier: Opera/9.80 (Windows NT 5.1; U; en) Presto/2.10.229 Version/11.64
System: Microsoft Windows XP Professional SP3

Note that the browser is run without JavaScript enabled.

Event Timeline

Bawolff subscribed.

Can you link to which image is being returned as webp?

Can you link to which image is being returned as webp?

I remembered the original URL of the image (in the screenshot) being:

https://upload.wikimedia.org/wikipedia/commons/thumb/3/33/Iconsiam_at_Night.jpg/250px-Iconsiam_at_Night.jpg

But it changed to return conventional JPEG format shortly after I posted this report. (What a coincidence...)

However, there are multiple gallery images down below within that article which are still returned in WebP, at least in my browsing session; see below for URLs. (And before anyone asks, I confirm that file extensions in the URL really are what I wrote)

Part 1 (gallery screenshot):

Part 2 (gallery screenshot):

Icons are affected too (page screenshot):

Actually, most of the icons in File:* information pages' templates (on both English Wikipedia and Wikimedia Commons) are also affected.

Browser: Opera 11.64
U/A Identifier: Opera/9.80 (Windows NT 5.1; U; en) Presto/2.10.229 Version/11.64
System: Microsoft Windows XP Professional SP3

As usual, the browser is run without JavaScript enabled.

Please investigate and fix.
Browser: Opera 11.64

Note: That browser is >6years old and not supported as per https://www.mediawiki.org/wiki/Compatibility#Browser_support_matrix

Does the problem also happen with any other browsers? Which other browsers and browser versions have you tested?

Cannot reproduce, JPEG only:

$:acko\> wget -q "https://upload.wikimedia.org/wikipedia/commons/thumb/d/d3/%E0%B9%84%E0%B8%AD%E0%B8%84%E0%B8%AD%E0%B8%99%E0%B8%AA%E0%B8%A2%E0%B8%B2%E0%B8%A1_Grand_Openning_day_Iconsiam_of_Thailand_15_Copyrights_of_Trisorn_Triboon.jpg/120px-%E0%B9%84%E0%B8%AD%E0%B8%84%E0%B8%AD%E0%B8%99%E0%B8%AA%E0%B8%A2%E0%B8%B2%E0%B8%A1_Grand_Openning_day_Iconsiam_of_Thailand_15_Copyrights_of_Trisorn_Triboon.jpg"
$:acko\> file 120px-ไอคอนสยาม_Grand_Openning_day_Iconsiam_of_Thailand_15_Copyrights_of_Trisorn_Triboon.jpg 
120px-ไอคอนสยาม_Grand_Openning_day_Iconsiam_of_Thailand_15_Copyrights_of_Trisorn_Triboon.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=6, xresolution=86, yresolution=94, resolutionunit=2], baseline, precision 8, 120x80, frames 3

Opera 11.60 release in 2011-12-06 (.64 are just security updates). I guess in theory we could blacklist the old Opera UAs in the varnish config:
puppet/modules/thumbor/templates/varnish.vcl.erb

Opera webp support:
lossy profile: Opera 11.10+
lossy, lossless, and alpha: Opera 12

So it's supporting webp, but not all of webp.

Change 474693 had a related patch set uploaded (by Ema; owner: Ema):
[operations/puppet@production] Avoid serving WebP thumbnail variants to Opera

https://gerrit.wikimedia.org/r/474693

ema triaged this task as Medium priority.Nov 19 2018, 2:20 PM
ema moved this task from Backlog to Caching on the Traffic board.

Note: The chromium/webkit versions of Opera after opera 15 use the OPR string to identify Opera. These browsers likely DO have proper webp support, as they are basically identically to Chrome.

https://dev.opera.com/blog/opera-user-agent-strings-opera-15-and-beyond/

@ema's patch seems to take this into account (consciously or not)

I guess this means that these older Opera versions send request headers stating that they accept webp when they're in fact incapable of rendering them?

@Gilles see my note in T209805#4758174 v11 probably supports some early versions of them, but not all.

Indeed. I've installed 11.64 and even the lossy ones we generate don't work. And it does advertise webp support in request headers:

Capture d'écran 2018-11-19 16.15.58.png (56×1 px, 18 KB)

I think it's fair to blacklist non-Blink Opera, even if some later ones (still pre-Blink) do support the images we generate. It must be a negligible portion of traffic and shrinking.

I've just verified the current stable Opera out of curiosity and it does (unsurprisingly) render our webps correctly.

Change 474693 merged by Ema:
[operations/puppet@production] Avoid serving WebP thumbnail variants to Opera

https://gerrit.wikimedia.org/r/474693

Jdforrester-WMF renamed this task from Wikipedia sends WebP thumbnails even when the browser does not support it to Wikipedia sends WebP thumbnails when Opera claims to support it but lies.Nov 19 2018, 3:36 PM
Jdforrester-WMF removed a project: Patch-For-Review.

Verified the fix on enwiki front page using Opera 11.64