Page MenuHomePhabricator

MediaViewer should have special handling for images which link to other images
Open, LowPublic

Description

When there is not much space available (e.g. front page, portal pages), sometimes a cropped version of an image is used, linking to the full version:

[[File:Foo_cropped.jpg|link=File:Foo.jpg]]

This takes up little space and looks much better than scaling down the original image to the same size. (example)

MediaViewer currently does not load such images because it bails out on any image with a link parameter. Ideally, it should not bail out but load the target (non-cropped) image instead of the thumbnail.

Possible solutions:

  • when an image uses link= to link to another image, have MediaViewer display that image. This would require T59298 and some custom logic.
  • allow dynamic crop using the original image: T9757

Event Timeline

Tgr created this task.Nov 25 2014, 4:48 PM
Tgr raised the priority of this task from to Low.
Tgr updated the task description. (Show Details)
Tgr added projects: MediaViewer, Multimedia.
Tgr changed Security from none to None.
Tgr added a subscriber: Tgr.
Tgr updated the task description. (Show Details)Dec 19 2014, 4:42 AM
Edokter added a subscriber: Edokter.EditedFeb 18 2015, 11:46 AM

Another possible solution is auto-logic is too complicated: add some directive for MediaViewer to image syntax pointing to non-cropped image (|imagelink=).

Tgr added a comment.Feb 18 2015, 8:00 PM

Thumbnail syntax is horribly complicated already, both in terms of specification and parsing code. I would definitely not want to expand that.

You wouldn't have to expand anything (except perhaps as alias for |link=); it would only be there for MediaViewer to pick up so it can display the right image.

Tgr added a comment.Feb 18 2015, 11:08 PM

MediaViewer parses the HTML, not the wikitext.

Jdforrester-WMF moved this task from Untriaged to Backlog on the Multimedia board.Sep 4 2015, 5:57 PM
Restricted Application added subscribers: Matanya, Aklapper. · View Herald TranscriptSep 4 2015, 5:57 PM

Mass-removing the Multimedia tag from MediaViewer tasks, as this is now being worked on by the Reading department, not Editing's Multimedia team.

Tgr removed a subscriber: Tgr.Jul 9 2019, 6:03 PM
Restricted Application added a subscriber: Liuxinyu970226. · View Herald TranscriptJul 9 2019, 6:03 PM