Last modified: 2014-11-20 09:21:30 UTC
Clicking the large 800px thumbnail on a file description page leads to the source image being viewed as if it were a page in the browser. This kind of made sense as a quick hack for enlarged views when image resize was first introduced. But for files with mustRender(), the behaviour is undesirable, since the browser's behaviour when the user clicks on that link is typically surprising and unpredictable. This came up on IRC recently when a user complained that clicking on a description page thumbnail which has been rotated using the new EXIF autorotation feature resulted in an incorrectly rotated enlarged image being displayed. Such images have mustRender() == true. I suggest making thumbnail clicks for files with mustRender() == true do nothing, i.e. don't wrap that image with a link. Instead, provide a text link to the source file in the area below the thumbnail. Ideally thumbnail clicks of images with mustRender() == false would provide some kind of sensible, interactive enlargement interface, rather than causing all navigation to disappear and instructing the browser to download and decompress potentially hundreds of megabytes of image data.
This is the same way we already treat SVG, PDF, DjVu, TIFF, and other files that may or may not render in a browser... Might want to redo a lot of stuff on the image page. (I think there's some old bug entries along these lines to find...)
bug 24619 -- requests a consistent full-size PNG download link for SVGs bug 23162 -- requests the multiple size selector links for SVGs (some JS magic on some sites?) and other file types bug 25148 -- requests making a dedicated 'download original file' link that can actually force a download bug 29967 - requests a popup dialog to encapsulate the many sorts of options noted above
Created attachment 9186 [details] Patch Patch that removes the link on the thumbnail and adds a "full version" link to the image sizes. The full version link is the rotated image, unfortunately not yet losslessy rotated. The original files is downloadable via the file name. That one should probably be renamed to "original file" or something.
"removes the link on the thumbnail". No. The user is used to get the full version by clicking on the thumbnail. Do not change this for EXIF rotated images only. This is reduced functionality to "fix" a bug. The full version link may be used by external tools - please think of this.
(In reply to comment #4) > "removes the link on the thumbnail". No. The user is used to get the full > version by clicking on the thumbnail. Do not change this for EXIF rotated > images only. This is reduced functionality to "fix" a bug. > > The full version link may be used by external tools - please think of this. Ok, maybe this is okay for now. However, I do not know if some tools expect the original version link at the 800px image...
Adding "patch" and "reviewed" keywords for consistency, since this bug includes a reviewed patch.
Change 86383 had a related patch set uploaded by Brian Wolff: Make image on desc page not clickable if $file->mustRender() true. https://gerrit.wikimedia.org/r/86383
Change 86383 abandoned by Brian Wolff: [DO NOT MERGE] Make image on desc page not clickable if $file->mustRender() true. Reason: Feedback on commons was negative https://gerrit.wikimedia.org/r/86383
This could be solved by linking to a full-size thumbnail instead of the original file if mustRender() is true. See bug 65383 for a more generic discussion of showing thumbnails instead of originals.