Page MenuHomePhabricator

File description page thumbnail click versus EXIF rotation, mustRender()
Open, MediumPublic

Description

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.


Version: 1.22.0
Severity: normal
See Also: T67383: Generate optimised thumbnail even when dimensions match original

Details

Reference
bz31366

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:56 PM
bzimport set Reference to bz31366.
bzimport added a subscriber: Unknown Object (MLST).

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

Bryan.TongMinh wrote:

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.

Attached:

saibotrash wrote:

"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.

saibotrash wrote:

(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...

sumanah wrote:

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.