Page MenuHomePhabricator

imageinfo API returns incorrect data
Closed, ResolvedPublic


In this call it returns thumbwidth="1913" thumbheight="-1" as a size of an thumb, which is completly wrong.

Version: master
Severity: normal



Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:45 AM
bzimport set Reference to bz49921.

There are actually two bugs going on here.

First, TimedMediaHandler isn't normalizing dimensions for audio files, which means that the height=-1 being passed to indicate "don't limit by height" is being misinterpreted.

And second, TimedMediaHandler is using an incorrect calculation when the height is the limiting factor on the thumbnail dimensions, leading to the width of 1913. The same happens if you pass something like iiurlwidth=220&iiurlheight=10.

Since both of these are in TimedMediaHandler, I'm going to reassign this there. I'll also submit a patch momentarily.

Related URL: (Gerrit Change Ide7208394f8495f5b143cbba215d4645598f1a50)

(In reply to comment #2)

Related URL: (Gerrit Change

This has been merged, and went out with wmf9. However, given that wmf8 is on the servers for an extra week and it makes really not-nice behaviour in VisualEditor, we probably want to back-port this.

Change 71393 had a related patch set uploaded by Catrope:
Clean up transform dimension height handling

Change 71393 merged by Catrope:
Clean up transform dimension height handling

This backport is now live; as such, marking this bug as fixed.

Gilles raised the priority of this task from High to Unbreak Now!.Dec 4 2014, 10:21 AM
Gilles moved this task from Untriaged to Done on the Multimedia board.
Gilles lowered the priority of this task from Unbreak Now! to High.Dec 4 2014, 11:22 AM