Page MenuHomePhabricator

Enabling apiThumbCacheExpiry causes SVGs to output SVG thumbs
Closed, ResolvedPublic

Description

When apiThumbCacheExpiry is set to a non-zero value, the output created using APIForeignRepo with an SVG is:

<img alt="To laze is divine." src="http://wiki.example.com/wiki/files/commons/commons/Lazy_sleeping_barnstar.svg/500px-Lazy_sleeping_barnstar.svg" width="500" height="500" border="0" />

When apiThumbCacheExpiry is set to 0 (disabling it), the output created using APIForeignRepo with an SVG is:

<img alt="To laze is divine." src="http://upload.wikimedia.org/wikipedia/commons/thumb/d/d0/Lazy_sleeping_barnstar.svg/500px-Lazy_sleeping_barnstar.svg.png" width="500" height="500" border="0" />

Disabling apiThumbCacheExpiry uses the PNG thumbs from the foreign repo while enabling cache creates local thumbs that are not converted to PNG.


Version: unspecified
Severity: minor

Details

Reference
bz16265

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:23 PM
bzimport set Reference to bz16265.

Fixed in r43297. Turns out I was manually constructing the filename based on what I assumed to be the standard (width-name-extension), forgetting that some things get turned to PNG (like SVGs, in this case). Now we use the same file name as the remote site.