Closed
Bug 1081338
Opened 11 years ago
Closed 11 years ago
Enable conversion of svg images so that png previews are available
Categories
(Websites :: wiki.mozilla.org, defect)
Websites
wiki.mozilla.org
Tracking
(Not tracked)
RESOLVED
FIXED
2014-Q4
People
(Reporter: ckoehler, Assigned: cliang)
Details
(Whiteboard: [kanban:https://kanbanize.com/ctrl_board/4/1698] [dev=2014-10-23] [stage=2014-10-24] [prod=2014-11-06])
svg images are supported on the wiki, but display using the generic svn icon:
https://wiki.mozilla.org/skins/common/images/icons/fileicon-svg.png
Let's explore enabling png preview of svg images by changing the value of $wgSVGConverters in LocalSettings.php.
The value will depend on what's available on the webserver. Possibly ImageMagick?
Relevant documentation:
https://www.mediawiki.org/wiki/Manual:$wgSVGConverter
https://www.mediawiki.org/wiki/Manual:$wgSVGConverters
https://www.mediawiki.org/wiki/Manual:$wgSVGConverterPath
I'm not entirely sure of the performance impact of enabling this conversion, so we should be sure to test.
| Reporter | ||
Updated•11 years ago
|
Whiteboard: [dev=2014-10-16]
| Reporter | ||
Updated•11 years ago
|
Whiteboard: [dev=2014-10-16] → [dev=2014-10-23]
Whiteboard: [dev=2014-10-23] → [kanban:https://kanbanize.com/ctrl_board/4/1698] [dev=2014-10-23]
| Assignee | ||
Comment 1•11 years ago
|
||
In dev, I tested two different converters (ImageMagick and rsvg). The only setting I needed to change was $wgSVGConverter, e.g.:
$wgSVGConverter = 'ImageMagick';
Testing showed that both ImageMagick and rsvg had can convert some, but not all, SVG files present in the dev instance. It doesn't look like there is an update for ImageMagick (6.5.4.7-7.el6_5) in the usual repos; there may be bugfixes for librsvg2 (2.26.0-6 -> 2.26.0-14).
Reading through http://www.mediawiki.org/wiki/Manual:Image_administration#SVG, it looks like ImageMagick "is the default, but avoid it if possible. However, it does work." There are some suggestions for other converters. I've confirmed that there are packages available for the following:
inkscape 0.48.4-1
batik 1.7-8.5
batik will incur some overhead as it is Java based.
Looking for opinions RE: pursuing another converter versus trying to get a newer version of the converter we have versus waiting to see what happens if we have more SVGs to test with (as there are more SVGs present on stage). =)
| Reporter | ||
Comment 2•11 years ago
|
||
It sounds like rsvg is the converter recommended/used by wikimedia. Should we try that in stage where there are more svg files to test with?
Another option would be to enable direct rendering of svg in browser with this extension:
http://www.mediawiki.org/wiki/Extension:NativeSvgHandler
Comment 3•11 years ago
|
||
(In reply to Christie Koehler [:ckoehler] from comment #2)
> It sounds like rsvg is the converter recommended/used by wikimedia. Should
> we try that in stage where there are more svg files to test with?
If it's good enough for Wikimedia, it's probably good enough for us.
> Another option would be to enable direct rendering of svg in browser with
> this extension:
> http://www.mediawiki.org/wiki/Extension:NativeSvgHandler
If this appears to be a route we want to take, it should happen in a different bug.
Whiteboard: [kanban:https://kanbanize.com/ctrl_board/4/1698] [dev=2014-10-23] → [kanban:https://kanbanize.com/ctrl_board/4/1698] [dev=2014-10-23] [stage=2014-10-30]
| Assignee | ||
Comment 4•11 years ago
|
||
Pushed the changes to staging, using rsvg as the renderer. In a quick test of five SVG files, I got three to render, one came out as a black square, and one came back as "this file has been deleted".
Whiteboard: [kanban:https://kanbanize.com/ctrl_board/4/1698] [dev=2014-10-23] [stage=2014-10-30] → [kanban:https://kanbanize.com/ctrl_board/4/1698] [dev=2014-10-23] [stage=2014-10-24]
| Reporter | ||
Comment 5•11 years ago
|
||
Looking at the svgs on Stage:
https://wiki.allizom.org/index.php?title=Special%3AListFiles&limit=50&ilsearch=svg&user=
Most all svgs seem to render. Most, if not all, the ones that don't are test images uploaded by a bug bounty person and probably aren't actual images in the first place.
| Reporter | ||
Updated•11 years ago
|
Whiteboard: [kanban:https://kanbanize.com/ctrl_board/4/1698] [dev=2014-10-23] [stage=2014-10-24] → [kanban:https://kanbanize.com/ctrl_board/4/1698] [dev=2014-10-23] [stage=2014-10-24] [prod=2014-11-06]
| Assignee | ||
Comment 6•11 years ago
|
||
This change has been pushed into production. As theorized, the SVG preview images are built upon visiting the SVG page itself and forcing a reload (e.g. go to https://wiki.mozilla.org/File:<foo>.svg and force-reload).
As with stage, some images aren't building proper previews. It may be a matter of how strict/liberal one's SVG rendering software is.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
Target Milestone: --- → 2014-Q4
You need to log in
before you can comment on or make changes to this bug.
Description
•