Page MenuHomePhabricator

media viewer doesn't preserve thumbnail options like svg language
Open, LowPublic

Description

Steps to reproduce:

At the moment there's only a very small number of such images (commons:Category:Translation_possible_-_SVG_(switch)), so probably not a big deal initially, but its possible such images will take off in the future. Other formats might have other parameters that are important (PDF/DjVu page comes to mind), it would be nice if we could somehow support extra parameters just in general.

Details

Reference
bz58663

Event Timeline

bzimport raised the priority of this task from to Normal.Nov 22 2014, 2:34 AM
bzimport added a project: MediaViewer.
bzimport set Reference to bz58663.
bzimport added a subscriber: Unknown Object (MLST).
Bawolff created this task.Dec 18 2013, 7:39 PM

Blocker: There is no API module for this. See https://gerrit.wikimedia.org/r/25838 - either Harry forgot to add it or it was deemed not useful. There is no way to get a language-specific thumb URL as far as I can see.

PDF pages are supported via iiurlparam, as a hint - image language could be supported the same way.

(In reply to comment #2)

PDF pages are supported via iiurlparam, as a hint - image language could be
supported the same way.

It should already be. The implementation of that is generic for all media handlers

http://commons.wikimedia.org/w/api.php?action=query&titles=File:Gerrit%20patchset%2025838%20test.svg&prop=imageinfo&iiprop=url&iiurlwidth=300&iiurlparam=langde-300px

That's super annoying to discover. i.e. impossible to discover. Documentation fail. Bug 1 etc. etc.

It should be possible to look for extra params and just pass them to the iiurlparam parameter. I think. Probably. I'm not totally convinced that the thumb URL will always be exactly the same, but in most cases it will, so let's go with it!

(In reply to comment #4)

http://commons.wikimedia.org/w/api.php?action=query&titles=File:
Gerrit%20patchset%2025838%20test.
svg&prop=imageinfo&iiprop=url&iiurlwidth=300&iiurlparam=langde-300px
That's super annoying to discover. i.e. impossible to discover. Documentation
fail. Bug 1 etc. etc.

Indeed it really is. It was originally a hack to make instant commons work. It is totally and utterly undiscoverable.

It should be possible to look for extra params and just pass them to the
iiurlparam parameter. I think. Probably. I'm not totally convinced that the
thumb URL will always be exactly the same, but in most cases it will, so
let's
go with it!

It should always be the same.

See also bug 58920, which quibbles with the desired semantics of 'systemLanguage'.

Tgr added a comment.Jul 17 2014, 7:13 PM
  • Bug 68154 has been marked as a duplicate of this bug. ***
Tgr added a comment.Jul 17 2014, 7:15 PM

I think this actually works now (with thumbnail guessing, although not with thumbnails requested via the API), and the mixing of the languages is due to bug 62039.

Restricted Application added subscribers: Matanya, Aklapper. · View Herald TranscriptSep 4 2015, 6:38 PM
Jdforrester-WMF moved this task from Untriaged to Backlog on the Multimedia board.Sep 4 2015, 6:38 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.

Jdlrobson lowered the priority of this task from Normal to Low.Feb 2 2016, 6:31 PM
Jdlrobson added a subscriber: Jdlrobson.
Tgr updated the task description. (Show Details)Nov 2 2018, 8:21 PM
Tgr updated the task description. (Show Details)Nov 2 2018, 8:24 PM
Tgr added a comment.EditedNov 2 2018, 8:35 PM

This seems to work now, at least for SVGs (and I'm not sure what other usecases we have, given that PDF/DjVu are not supported at all) - the example in the task description is confusing due to T64039: MediaViewer confuses different instances of the same image on the same page but see e.g. https://eu.wikipedia.org/wiki/Azelerazio

It only works in the GuessedThumbnailInfo provider though, ThumbnailInfo is still broken. That's T208564: [Spike 4 hour] [BUG] MediaViewer ignores thumbnail options when using API provider for thumbnails.

Tgr removed a subscriber: Tgr.Jul 9 2019, 6:05 PM