mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-15 11:46:55 +00:00
e406d4556f
Don't assume that thumbnail URLs contain a dimension delimiter of "px-". Previously, thumbnail URLs always contained the width. e.g.: https://upload.wikimedia.org/wikipedia/commons/a/aa/100px-Red_Giant_Earth_warm.jpg However, thumbnail URLs that actually point to the original are not sizable: https://upload.wikimedia.org/wikipedia/commons/a/aa/Red_Giant_Earth_warm.jpg These are provided, for example, when the thumbnail size requested is larger than the original. There was code designed to handle this scenario but it only applies when RESTBase and page preview thumbnail sizes happen to be in sync. In other words, if RESTBase requests a large thumbnail on behalf of page previews, and page previews only requested a small thumbnail, the original may be unexpectedly provided. A conditional is introduced in this patch to verify that "px-" is actually detected. If it is not present, the original is used. Bug: T187955 Change-Id: If4e29dd870aecd6d461cc8203f6576d1bb8844f2 |
||
---|---|---|
.. | ||
index.test.js | ||
mediawiki.test.js | ||
rest.test.js |