Manual talk:Image administration

See Error creating thumbnail for possible solutions for this error

Image Upload/Access location mismatch
I installed from an ubuntu package, MediaWiki 1.11.2 How can I configure it for everything to come from /var/www/mediawiki?
 * In LocalSetting.php, I have set MW_INSTALL_PATH to /var/www/mediawiki
 * When I upload an image it goes into /var/www/mediawiki/images
 * But when I try to display that image, I get nothing. In the apache error log I see that it is trying to access the image file from /var/lib/mediawiki/images.

Thanks

Update
-- I 'fixed' this by creating a symlink

How to use Mediawiki:Licenses?
I think the text in this article is hard to understand. I don't want my users to be able to upload images without selecting a license. How do I do that? There's a default option called "No license selected". I want that greyed out or something.

Cannot get convert (thumbnail) to work on W2k3

 * Installed Dynamic ImageMagick in the following directory -> D:\ImageMagick-6.3.0-Q16
 * Verified that ImageMagick worked on command line
 * Verified Environment variable is PATH'd correctly
 * Verified to Web Server has access to D:\ImageMagick-6.3.0-Q16 directory
 * Modified LocalSettings.php with the following lines:
 * $wgUseImageResize		= true;
 * $wgUseImageMagick		= true;
 * $wgImageMagickConvertCommand	= "D:\\ImageMagick-6.3.0-Q16\\convert.exe";

also tried:
 * $wgImageMagickConvertCommand	= "D:\\ImageMagick-6.3.0-Q16\\convert";
 * $wgImageMagickConvertCommand	= "D:\\ImageMagick-6.3.0-Q16/convert.exe";
 * $wgImageMagickConvertCommand	= "D:\\ImageMagick-6.3.0-Q16/convert";
 * $wgImageMagickConvertCommand	= "/usr/bin/convert";

with no luck on any of them.

Any tips to try would be very much «appreciated».
 * Try fixing the double slashes. That ought to do it. 69.153.141.224 02:59, 22 December 2006 (UTC)

Following will be ok
$wgEnableUploads      = true; $wgUseImageResize     = true; $wgUseImageMagick = true; $wgImageMagickConvertCommand = "C:/Program Files/ImageMagick-6.3.2-Q16/convert";
 * 1) To enable image uploads, make sure the 'images' directory
 * 2) is writable, then set this to true:
 * 1) $wgImageMagickConvertCommand = "/usr/bin/convert";

-- WonYong ( Talk / Contrib ) 06:42, 3 March 2007 (UTC)

Unfortunately I have the same issue, I have my settings exactly as in this article (correct path ) however still get the error listed. Anyone else with any input?


 * If it's Windows, that last line should be:

$wgImageMagickConvertCommand = "C:/Program Files/ImageMagick-6.3.2-Q16/convert.exe"; Michael Daly 05:31, 17 July 2007 (UTC)

Error creating thumbnail: Unable to run external programs in safe mode.
I couldn't manage to install and run ImageMagick properly for my own wiki. I have the error msg as it's seen in the thread when i try to use thumbnailing code of wiki. Any detailed instruction or any web page i can find instruction would be highly appreciated. I also find an old version of ImageMagick which is pre-compiled. Is that usefull and easier to install?


 * Well, you can take off safe mode. If not then there is no point in installing ImageMagick. You will get the same error message. You could use GD::SVG, that is, if you can install it. If you are on host, that might not be an option because server needs to compile it. You can get a binary but your back to the safe mode restrictions. You could call GD directly, but the thumbs will not display correctly because GD does not support svg. In other words, if you cannot disable safe mode and you are on a picky sticky host then as current your options is most likely none. I would not be too concerned. Have a look wikipedia. They have a very large amount of png images with a template asking to move to svg because they might consider the time is right. You may consider a similar option. 03:18, 19 September 2007


 * I experience the same problem. As I removed "$wgUseImageMagick = true;", the thumbnailing works well now. But SVG could not work yet. [I installed my wiki on a mandatory host, which I have no full control on it.] -- Senvey 04:30, 27 August 2008 (UTC)
 * I just got the roo-cause was the PHP is in safe mode, which was probably set in php.ini. -- Senvey 06:18, 27 August 2008 (UTC)
 * VERY strange that it works with "$wgUseImageMagick = true;" commented out, but the same here! Now thumbnailing works (all except svg), even with Safe Mode on (just use the correct safe mode exec dir etc settings)
 * I think when you disable wgUseImageMagick, MediaWiki use your previously created thumbnails so no error occured. Did you try to upload some new images and test its thumbnail? And remember that PHP config directives are not only in php.ini. If you installed PHP as Apache module, Apache's config file can effect PHP (see http://php.net/configuration.changes). To ensure that safe mode is off, you should create a .php file in the same directory with MediaWiki's index.php, fill it with the code, and view it by browser. Cumeo89 02:38, 25 March 2009 (UTC)
 * No, commenting out #$wgUseImageMagick = true; actually restores thumbnailing to newly uploaded images. SpiralOfYarn 23:56, 14 June 2009 (UTC)
 * I have exactly the same problem. Rendering thumbnails always fails with the »Unable to run external programs in safe mode« error.  In fact, at my own site safe_mode is off, as some short phpinfo instantly proves!  But what can I do?  Disabling ImageMagick is not an option as GD seems to have problems with file names containing umlauts.  I would really appreciate any hints! --77.179.108.82 21:57, 26 June 2009 (UTC)
 * Yes, and look at this google search. Lots of people have this problem.  Can't someone give an answer? Pardoned Turkey 01:53, 28 June 2009 (UTC)
 * For me this error was caused by disable_functions including passthru. Removing passthru from the list of disabled functions made everything work great.  If it still doesn't work try enabling Logging and see if that lists anything useful. -DavidSev 20:08, 1 September 2009 (UTC)

Error creating thumbnail: (using rsvg)
When uploading an svg image, I get a gray background and the words "Error creating thumbnail:" but with no explanation, etc. Here's what I have in SVG related code in LocalSettings.php:

$wgFileExtensions[] = 'svg'; $wgAllowTitlesInSVG = true; $wgSVGConverter = 'rsvg'; $wgSVGConverterPath = "C:/Program Files/librsvg";

I've probably missed something stupidly important, but can someone please help??? Thanks! JonathanWiki 22:41, 27 September 2008 (UTC)
 * Anytime I try to use the |thumb command or resize an image on my newly installed board I get the following error

Error creating thumbnail:

Warning: passthru has been disabled for security reasons in /home/iptvwiki/public_html/w/includes/GlobalFunctions.php on line 2030


 * Image upload works correctly and I can display the images full size, just no resizing. I have another wiki on the same host and that one works so I don't know what the problem may be. --MasterZ
 * See above, I changed all the posts with the same question to "Error creating thumbnail:" Rumpsenate 08:00, 17 July 2009 (UTC)

Error creating thumbnail: Not able to view images of pixels more than 800*600
Hi ALL

The error that i get: Error creating thumbnail: The system cannot find the path specified. Size of this preview: 800 × 600 pixels Full resolution (2048 × 1536 pixel, file size: 813 KB, MIME type: image/jpeg)

And there is a blank grey screen, but when i click on the full resolution link, the image can be seen.This uploaded image can be seen nowhere on the wiki, even thumbnails give the same error.

Please help me on this ! --Ankit.madan 07:54, 7 September 2007 (UTC)


 * Check that you don't still have the old imagemagick code enabled. I was having this problem and realized that in a fit of idiocy I tried to comment out the imagemagick variables in localsettings with ';' instead of '#'.


 * I'm running windows server 2008, I have found that you must manually go to the ImageMagick website, download and install the program, and set $wgImageMagickConvertCommand = "C:/ImageMagick/Convert.exe"; or whatever your directory is instead of /usr/bin/convert or whatever it is, since they design it for bloody linux only

--Pwgus 06:17, 9 October 2009 (UTC)

Error creating thumbnail: SVG Error creating thumbnail
I hate to throw my problem to the masses but I've exausted all other available resources. I'm having exacly the problem this wiki is having in rendering my svg thumbnails. I'm using CentOS 5 in 64-bit mode, apache 2.2.3, php 5.1.6, mediawiki 1.12.0, ImageMagick 6.2.8, rsvg 2.16.1

LocalSettings.php $wgFileExtensions[] = 'svg'; $wgAllowTitlesInSVG = true; $wgSVGConverter = 'rsvg'; // or ImageMagick

ImageMagick error, as seen on this other person's wiki, appears instead of the image, no .png file is created at the thumbnail location Error creating thumbnail: ERROR: meta.c (179): wmf_header_read: this isn't a wmf file convert: Delegate failed `"wmf2svg" -o "%o" "%i"'. convert: unable to open image `/tmp/magick-XXZSRth4': No such file or directory. convert: unable to load module `/usr/lib64/ImageMagick-6.2.8/modules-Q16/coders/svg.la': libdbus-1.so.3: failed to map segment from shared object: Cannot allocate memory. convert: unable to open file `/tmp/magick-XXZSRth4': No such file or directory. convert: missing an image filename `PNG:/var/www/html/wiki/images/thumb/2/2c/Broom_icon.svg/400px-Broom_icon.svg.png'.

RSVG error, appearing in a log file, with a broken image on the page, no .png file is created at the thumbnail location (libcom_err.so.2 is installed through e2fsprogs-libs 1.39) /usr/bin/rsvg-convert: error while loading shared libraries: libcom_err.so.2: failed to map segment from shared object: Cannot allocate memory

Following the syntax presented in $wgSVGConverters for ImageMagick or rsvg on the command line produces the proper png file from a valid svg file. DefaultSettings.php (unchanged) $wgSVGConverters = array( 'ImageMagick' => '$path/convert -background white -geometry $width $input PNG:$output',  'rsvg' => '$path/rsvg -w$width -h$height $input $output', );

I thought I might have a permission problem. Apache run with the user apache:apache, which owns all the web files. /tmp is publicly writable. I changed /var/html/wiki/Images/thumb to be publicly writable with no effect. I'd like to use svg's, if someone has a clue please help. I have a suspision that the wiki I linked also uses CentOS in 64-bit mode.

Please don't suggest upgrading software versions unless you are absolutely sure it fixes this particular issue. Software updates on CentOS are non-trivial and have repercusions in the enterprise environment. If you have are having this issue, please also pipe in, and people might take the issue more seriously. Thanks for your time. Quadir


 * You may try to increase shell memory limits in LocalSettings.php, e.g.

$wgMaxShellMemory = 131072;
 * This helped for me with rsvg - the default 102400kB in DefaultSettings.php turned out to be a bit to small.
 * This question was asked before, with some answers:
 * Error creating thumbnail: Unable to run external programs in safe mode. (above)
 * Error creating thumbnail: convert.exe: unable to open image :Permission denied
 * User_talk:Emufarmers
 * It appears like this problem is very common, with over 9,000 pages having the same problem.
 * Rumpsenate 07:35, 17 July 2009 (UTC)

Error creating thumbnail command not found
Above is my full error, in a gray box.

See also:
 * Manual:Image_Administration
 * Manual:Errors_and_Symptoms

mwusers.com has several posts on this problem.

I also found this: Thumbnails_Not_Working

Also this posting: Using ImageMagick in Mediawiki i have to chmod 777 the image/thumb/ directory to get it working.

Rumpsenate 12:44, 17 July 2009 (UTC)

Error using thumbnail: even if ImageMagick works with other Scripts.
My ImageMagick Installation uses /usr/local/IM6/bin/.

This Configuration works well at my vBulletin Forum and on Typo3 and a Joomla CMS.

I have changed this Path at my LocalSettings.php but it still says to me at the Articel:

"Fehler beim Erstellen des Vorschaubildes: sh: line 1: /usr/local/IM6/bin/: is a directory "


 * I have the same problem - any idea?
 * I think you need to point directly to convert and not just the directory it's in

Error SVG
I can't upload SVG. manual is not work.

Copy all LocalSettings.php file contents to here, please. -- WonYong ( Talk / Contrib ) 06:47, 3 March 2007 (UTC)


 * It would help if you would post the actual error message. -- Duesentrieb ⇌ 10:45, 3 March 2007 (UTC)

Success!! Image thumbnailing

 * ko:사용자:멀뚱이/미디어위키 for korean
 * en:User:WonYong/SVG setting for english

-- WonYong Talk  04:43, 4 December 2007 (UTC)

I installed mediawiki on Windows XP I use ImageMagick-6.3.2-Q16

Following is my source file:

$wgScriptPath      = "/mediawiki";
 * 1) The URL base path to the directory containing the wiki;
 * 2) defaults for all runtime URL paths are based off of this.

$wgFileExtensions[] = 'svg'; $wgAllowTitlesInSVG = true;

$wgSVGConverters = array(   'ImageMagick' => '"C:/Program Files/ImageMagick-6.3.2-Q16/convert" -background white -geometry $width $input $output',  );

$wgSVGConverter = 'ImageMagick';


 * 1) For more information on customizing the URLs please see:
 * 2) http://www.mediawiki.org/wiki/Manual:Short_URL

$wgEnableEmail     = true; $wgEnableUserEmail = true;

Following is seemed to be Linux environment

$wgScriptPath      = "/mediawiki";
 * 1) The URL base path to the directory containing the wiki;
 * 2) defaults for all runtime URL paths are based off of this.

$wgFileExtensions[] = 'svg'; $wgAllowTitlesInSVG = true;

$wgSVGConverter = 'ImageMagick';


 * 1) For more information on customizing the URLs please see:
 * 2) http://www.mediawiki.org/wiki/Manual:Short_URL

$wgEnableEmail     = true; $wgEnableUserEmail = true;

-- WonYong ( Talk / Contrib ) 02:50, 6 March 2007 (UTC)

Image thumbnailing and resizing: intelligent program analysis of image content
Why does MediaWiki make unnecessary Thumbnails? e.g; on Image:USDA Hardiness zone map.jpg the "higher resolution" image is only slightly different from the the "thumbnail", and it is therefore wasteful to bother producing one instead of showing the actual image. --belg4mit


 * Because we suck, we're all incompetent, bad programmers, and MediaWiki is doubtless the most ridiculous piece of software out there, and thus not suitable for your use. I would strongly advise using an expensive, proprietary solution, where your developers are paid and have time to listen to unhelpful criticism. robchurch | talk 13:38, 10 July 2007 (UTC)

--


 * Peter Blaise trys a response: Hi belg4mit. I think what Rob is suggesting in his own unique and witty way is that MediaWiki is OpenSource at it's most dynamic.  So ... JUMP IN and make it what you'd prefer!  Perhaps YOU can suggest AND PROGRAM your own enhancements to the existing MediaWiki programming that would meet your needs, and benefit all subsequent users.  In other words, I think Rob is suggesting that we all stop asking others for the enhancements we want, and get to work creating the changes we want for ourselves.  And then, like the programmers before us, Rob included, upload our solutions for all others to share and improve upon.  Have I got it, Rob?  ;-)
 * So, belg4mit, I think we are all aware that "stupid" is too general a word, and could apply to programmers as well as to programs and to users, and apparently in your case, to a mismatch between your preferences and the defaults of the programmer's choices that came before you. So, make it intelligent by your standards.  Then it's up to others to asses your preferences as stupid for their own purpses or not, and improve from there.  OpenSource is messy and evolves in spits and spurts, and may never be perfect for everyone all at the same time. I think my own MediaWiki setup choices, tough appropriate for our group, might frustrate other MediaWiki users.  It's all custom.  So, belg4mit, I look forward to your contributions, and seeing your configuration settings and custom program enhancements.  Why not start a contribution list of your own at User:Belg4mit and let us keep track of your solutions and give you our useful feedback?
 * By the way, I know of no "intelligent" image manipulation program out there, anywhere, on or off MediaWiki, at any price. That is, I know of NO image program that intelligently makes decisions based upon the contents of the image, especially "smart" resizing.  If anyone knows of any such tools, PLEASE share links here, and let's see if we can incorporate them into MediaWiki.  In the meantime, I've renamed this thread from "Stupid sizing" to  "Image thumbnailing and resizing: intelligent program analysis of image content".  There are more than 1 million links resulting from a Google.com search for "+intelligent image manipulation" - overwhelming, but it's a place to start.  Essentially, it's advice to the person running any image program to do that "intelligent" analysis on their own, in their own mind's eye, before saving!  Otherwise, everyone should be advised that any image appearing on any MediaWiki screen is the result of someone's active or default choices, and may appear useful, or not, to the subsequent viewer ... and may also be dependent somewhat on the end user's browser settings and screen resolution and settings.  Check yours at http://gemal.dk/browserspy/ - mine is ~96dpi, and these letters are ~1/8th inch (~3mm).  What's yours?
 * -- Peter Blaise peterblaise 17:54, 10 July 2007 (UTC)

Uploaded SVG images don't look correct
Hi all,

I've been trying to add a couple .svg images to my new wiki (1.10), and for the life of me, I can't them to look like they do here.

For example, this is your file:



and this is what happens why I put it in my wiki (and it scales horribly, too):



I've tried this with ImageMagick and Inkscape, and they look the same. I'm guessing its a parameter in the LocalSettings file, maybe in here:

$wgSVGConverters = array(   'ImageMagick' => '"C:/Program Files/ImageMagick-6.3.5-Q16/convert" -background white -geometry $width $input $output' );

Any ideas? Nate


 * Also, is there anyone from mediawiki that could tell me what converter mediawiki.org is using? And maybe the applicable settings in the LocalSettings file? I'm certain it has something to do with that. Thanks!

--Natebsi 18:53, 18 July 2007 (UTC)


 * All the official projects use rsvg -Steve Sanbeg 18:45, 17 August 2007 (UTC)

Thumbnail circular reference
If you click on the link in this article for info on thumbnailing to go to the File Upload page, it presents a link back to this page.Michael Daly 02:36, 31 August 2007 (UTC)

How Do I Change the Default Resolution for Medium-Sized Thumbnails?
I am using a skin that sets the globalwrapper div (and hence, the main content area) to a fixed width, 850px, including the navigation menus. When I upload a large image, the medium-sized thumbnail often extends beyond the boundary of the main content area, and it looks really bad. What could I do to make the default resolution for the medium-sized thumbnail a bit smaller? I have some knowledge of PHP but don't know where to look for this setting. Thanks.

I am using the GD Library, but if I have to, I'll get Image Magick.

--Wikitonic 22:05, 27 September 2007 (UTC)

UPDATE: I checked inside the thumbnail directory and now I see that each upload is automatically resized to 5 different resolutions (180px, 300px, 350px, 500px, and 800px). So let me rephrase the question, by splitting it up into two questions. (1) How can I have MediaWiki display the 500px thumbnail instead of the 800px thumbnail when you go directly to an image's page (image:xxx.jpg)? Or, (2) Is there any way to have the resizing script create the largest thumbnail to be slightly less than 800px (e.g. 650 or 700px instead of 800px)? Either solution will work fine for me.

--Wikitonic 18:06, 1 October 2007 (UTC)


 * UPDATE: For anyone dealing with the same problem, you can find the answer at manual:$wgImageLimits.


 * --Wikitonic 15:31, 29 October 2007 (UTC)

Thumbnailing Instructions Incomplete or Inconsistent?
"To enable image thumbnailing, set ... $wgUseImageMagick to true ..." Even when using only GD?

"Make sure the $wgImageMagickConvertCommand variable points to the proper location of the convert command of your installation ...." What would this be for the GD included with WAMP?

Rebuilding Thumbnails
I had permissions problems following WikiMedia installation, and no thumnails were created following importImage.php. Is there a simple admin script to sweep through to rebuild thumbnails in their hash directories? Many thanks Gaudete 15:30, 13 November 2007 (UTC)

SVG
Hello,

I have a problem with svg files on my local wiki. I have allowed the upload of the SVG files so now I can upload such files, no problem with this part. But I don't understand the 'part 2' : "Second, set $wgSVGConverter to the renderer you want to use" : I imagine that it isn't enough just to say "I want to use rsvg or magick", but that you have to install it on the server. I don't know how to do that, can anyone help me ? by advance, thanks Malta 13:36, 19 November 2007 (UTC)
 * en:User:WonYong/SVG setting I write this for you. :) -- WonYong Talk  04:40, 4 December 2007 (UTC)

Cannot delete images as Admin
Hi, I have the problem that I get an error message when trying to delete images from our wiki. It says: "Error deleting file: Could not create directory "deleted/5/t/w"." And the there is one long line with a message right in my wiki. It says that the permission is denied in a certain directory and ends with "...GlobalFunctions.php online 1670" Can anybody help me with that? My best, --Gollum 19:30, 8 December 2007 (UTC)


 * Hey Gollum, I had the same issue on my 1.11.0 instance - a 777 chmod on /images/deleted seemed to work. --Chrys 16:08, 5 January 2008 (UTC)
 * Yes, that's it! Thank you! --Gollum 00:46, 6 January 2008 (UTC)

Are deleted images still stored?
I wonder if deleted images are still stored in MW 1.8.2. and if so how can I delete those deleted images? Thanks! subfader

Resizing of Some GIFs Rendering Poorly; Setting Needs Changing?
The resizing of images for thumbnails generally works great, but for some reason it does not for a small subset of images. This subset seems to be GIF images with large transparent backgrounds, e.g. logos. When they are being resized, some of the foreground is being dropped. This dropping does not occur if you resize in Photoshop. Could it be that a simple change in setting is needed?

Examples:
 * 
 * 

External applications
The notes for using external apps to render svg are a little confusing for someone unfamiliar with adding applications to web servers. I use a shared Linux server with the most recent Mediawiki loaded onto it. I'd like to use the same renderer as wikipedia, but it seems that is only for gnome environments - is that right? How (if you can?) do you install Imagemagic or anything else via ftp? Surely you don't put it on your local machine, else how will it work when other people view the svg files? Any pointers on how to get a svg renderer onto my server would be gratefully welcomed. RS

Image Renaming
Well i have done some searching and as of yet i have found a good solution or answer that will allow me to Rename an image. For the most part, until recently, the names of my images were a combined name (ie MediaWiki.jpg) instead of a representative name (ie Media_Wiki.jpg) Yes i know the underscore is evaluated as a space but it still files it as such with the underscore.

If renaming is not possible, then how about considering updating the mediawiki template to allow pictures to be considered moveable much like the other pages. Currently i am forced to delete them and upload the same image with the correct naming format.

Goldbishop 18:42, 8 April 2008 (UTC)
 * Unfortunately, image renaming is still impossible (see bug 709). —Emufarmers(T 21:26, 8 April 2008 (UTC)


 * Now it's possible, see Manual:$wgAllowImageMoving. Already enabled in MW 1.14, needs to be set to true in MW 1.13. Capmo 03:30, 3 May 2009 (UTC)

PDF Thumbnails?
I host many PDFs on my wiki, and in order to get a proper thumbnail, I first have to export the PDF as an image, upload that image, then link it to the PDF in question. Imagemagick can work with PDFs already. Here are some examples. Imagemagick itself says that it's not the best tool for vector-vector conversion, but we're not trying to do that, all we want is a preview thumbnail for uploaded PDF files, instead of that hokey adobe icon. Is it possible to add this functionality? Where in the code would it exist in the first place?
 * http://www.ibm.com/developerworks/library/l-graf2/

Rename images
I can't find any information about renaming images anywhere. My Wiki-users are uploading images without renaming them. Now I have a lot of images named "135.jpg" and other numbers. I want to rename images so that the image-name describes what's in the picture. But how? /Abbedabb 10:15, 30 May 2008 (UTC)

Use $wgAllowImageMoving = true; in LocalSettings.php. See also See https://bugzilla.wikimedia.org/show_bug.cgi?id=15842 and https://bugzilla.wikimedia.org/show_bug.cgi?id=709

SVG on hosting server
Hello. I'm using Mediawiki on a hosting server, and i have no access to the files outside the website directory. So i don't think i can install a svg converter there.

Is there an alternative solution for enabling SVG thumbnail?

Thanks a lot. Crlf0710 07:32, 9 February 2009 (UTC)

Looking for video tutorial
I'm definitely a MediaWiki noob, so I've been looking for the for a good tutorial on ImageMagick (preferably with images or a video walkthru). Can anyone point me in the right direction? Thanks. Cannedgoods 00:01, 23 March 2009 (UTC)


 * You don't need to know anything about ImageMagick to use it with MediaWiki; you just need to download and install it (you might be able to use your operating system's package manager instead). —Emufarmers(T 20:27, 24 March 2009 (UTC)

Which renderer ?
Which renderer do the wikimedia sites including commons and wikipedia use as their svg renderer?


 * anyone know?

Batik refuses to render SVG images.
Using: Mediawiki version 1.15.1, OS: Ubuntu 8.04.3 LTS, PHP 5.2.4, Apache 2.2.8

Attempting to render SVG graphics I get this error instead of the thumbnail or image:

Error creating thumbnail: Exception in thread "main" java.lang.NoClassDefFoundError: org.apache.batik.i18n.LocalizableSupport at org.apache.batik.apps.rasterizer.Messages. (Messages.java:48) at java.lang.Class.initializeClass(libgcj.so.81) at org.apache.batik.apps.rasterizer.Main. (Main.java:299) at java.lang.Class.initializeClass(libgcj.so.81)

Have downloaded batik 1.7 binaries, and have decompressed (using JAR) to /usr/share/java/ This seems to make MediaWiki reference and use the Batik java system, as I was receiving a completely different error before regarding the rasterizer jar file not being found. Now with the change, it spits the aforementioned error.

Have entered in LocalSettings.php: $wgAllowTitlesInSVG = true; $wgSVGConverter = batik; $wgSVGConverterPath = "/usr/share/java/";

Have searched everywhere on the web - no clues. Can break it further by removing the Java files, so this proves the Java is being loaded for Batik. It just doesn't work.

Could this be a missing dependency in Ubuntu, rather than an actual code problem?

As this is breaking my head for 2 days now I'm going to ditch Batik as it has wasted my time. I write this in the hope I can help someone else avoid using this mistake piece of software.

Update: I have successfully rendered SVG images using ImageMagick. Initial configuration: $wgAllowTitlesInSVG = true; $wgSVGConverter = 'ImageMagick'; $wgSVGConverterPath = "/usr/bin/";

This did not work straight away, due to missing dependency: libwmf-bin This provided previously missing wmf2eps binary.

I employed this change to LocalSettings.php:

$wgMaxShellMemory = 131072;

And used chmod 777 on the thumb directory under the images directory.

eg: chmod 777 /usr/share/mediawiki-1.15.1/images/thumb

And now all is working well.

I say the main page for SVG images should recommend ImageMagick. I dont understand why it is considered to do a poor job, seems to work just fine here.