Page MenuHomePhabricator

Distorted thumbnail for audio files due to wrong size
Closed, ResolvedPublic

Description

When querying the API for audio thumbnails (yeah, appears to be stupid ...) it returns a height and width in a manner that let the thumb look distorted.

Example:
https://commons.wikimedia.org/w/api.php?action=query&format=jsonfm&iiprop=url|size|timestamp|user|sha1|comment|mime&iiurlheight=120&iiurlwidth=120&intoken=&prop=imageinfo&titles=File:Ca-Rosa_Lavi%C3%B1a_Carreras-article.flac

Result:
"thumburl": "https://bits.wikimedia.org/static-1.25wmf22/resources/assets/file-type-icons/fileicon-ogg.png",
"thumbwidth": 120,
"thumbheight": 13,

https://bits.wikimedia.org/static-1.25wmf22/resources/assets/file-type-icons/fileicon-ogg.png is a 120x120px file which is then squashed to 13px height

Details

Reference
bz66852

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:26 AM
bzimport set Reference to bz66852.
bzimport added a subscriber: Unknown Object (MLST).

I guess its returning the width/height of the JS player, but then outputting the url for file icon which really isn't used.

Maybe it should be outputting https://commons.wikimedia.org/wiki/File:Ca-Rosa_Lavi%C3%B1a_Carreras-article.flac?embedplayer=yes (Once the bug on that is fixed) as a url to put in an iframe or something.

Rillke set Security to None.
Rillke removed subscribers: Fabrice_Florin, Unknown Object (MLST).
brion claimed this task.

This now returns 120x120 as expected for the thumb.