[Mediawiki-l] Help: URL resizing 404, SVG's render distorted

Jeremy Baron jeremy at tuxmachine.com
Tue Nov 8 07:35:01 UTC 2011


Hi,

On Tue, Nov 8, 2011 at 00:47, badon <fastgoldfish at gmail.com> wrote:
> Yes, that's correct. The login is Demo/test - thanks for having a look at it.

Ahh, I see that was in the original mail. I didn't realize what it was at first.

On Tue, Nov 8, 2011 at 00:22, badon <fastgoldfish at gmail.com> wrote:
> sumanah from #mediawiki suggested that I post here. I set up SVG support on
> my wiki, and I got the javascript links to rendered PNG images working to.
> But, I noticed a few problems:
>
> * SVG images distorted when thumbnails are generated using normal wiki image
> link syntax.
>
> I have no idea why the SVG images are being rendered all weird.
> ImageMagick's /usr/bin/convert seems to be configured correctly in
> localsettings.php, and I don't see any problems.

What command are you using to make SVG thumbs? What distro, convert
package version, and convert version do you have? Are you using
imagemagick's convert or rsvg or something else?

I'm not sure exactly what rsvg version the WMF cluster is using but
you may want to try something from
http://packages.debian.org/librsvg2-bin

You say "seems to be configured correctly"... what exactly are your
settings so we can compare?

You can see @ http://noc.wikimedia.org/conf/highlight.php?file=CommonSettings.php
that the WMF cluster is using
> $path/rsvg-convert -w $width -h $height -o $output < $input

> * I also discovered that when I clicked on the link javascript links to
> rendered PNG images, 404 errors were returned. This happens for ALL kinds of
> images when scaling is requested via URL.
>
> In troubleshooting this I got as far as finding some info about thumb.php
> and htaccess rewrite rules that are supposed to redirect the 404 URLs to
> thumb.php so the images can be generated. It's all greek to me, and I'm
> surprised it isn't working by default on my wiki.

[...]

Well, the greek basically is a way to tell the web server to rewrite
the request before sending a response *if* the file is missing.

Those JS URLs are a local hack at individual wikis and not part of a
default mediawiki install (i think! at least last I checked) so I'm
not surprised they don't work out of the box.

-Jeremy



More information about the MediaWiki-l mailing list