Page MenuHomePhabricator

Exclude redundant srcset attribute values (e.g. same url)
Closed, ResolvedPublic


Sometimes MediaWiki decides not to create a thumbnail.

Either because the original is so small that no larger versions exist, or some other reason. In that case, one or both of the srcset values may be redundant. If a srcset 2x url is the same as srcset 1.5x url, it should be omitted. Similarly, if the srcset url is the same as the src url, it should be omitted entirely as well.

Note that this task applies regardless of T67383.

Example on Wikimedia Commons:



<a href="/wiki/File:Lock_icon_blue.gif" class="image">
<img alt="Lock icon blue.gif"
 width="12" height="10"
 srcset=" 1.5x, 2x"
 data-file-width="16" data-file-height="13"></a>

Event Timeline

Restricted Application added subscribers: Zppix, Steinsplitter, Matanya, Aklapper. · View Herald Transcript

Change 299533 had a related patch set uploaded (by Matthias Mullie):
Exclude duplicate srcset urls

Change 299533 merged by jenkins-bot:
Exclude duplicate srcset urls