Just now someone reported in Commons that this file:
is displayed on that page with the wrong dimensions (making it look completely distorted, resized and scaled out of proportion by the browser).
Both the main thumbnail on top and the top row of the File history were affected.
They've purged it and that fixed it. However it was the MediaWiki-page that needed purging, the file itself was fine.
The main reason this happens is because we link to the canonical "current" version of an image by a version-less url. As a result, when a reupload occurs that changes the dimension (e.g. a crop, rotate, whatever), and this canonical url is purged, every existing <img> referencing that url will show the image in the browser out of proportion because we hardcode the width/height everywhere.
Note:
- The example file above has a different unrelated problem (the first revision of the file has gone missing, 404).
- I wonder whether this is limited to the File page. I doubt it. This probably affects usage in articles as well, including cross-wiki.
Now, before someone says it is unlikely the dimensions of a file change, I"ll respond: It is unlikely that a file changes at all because (at least Commons) actively discourages re-upload. It should only be done for non-trivial changes (anything else should be done as a new upload). So the few re-uploads that do happen quite change the dimensions (e.g. fix wrong orientation, or crop away borders of some kind).
Version: 1.22.0
Severity: normal