Manual talk:Image Administration

From MediaWiki.org

Jump to: navigation, search

Contents

[edit] 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.

[edit] 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)

[edit] Following will be ok

## To enable image uploads, make sure the 'images' directory
## is writable, then set this to true:
$wgEnableUploads       = true;
$wgUseImageResize      = true;
$wgUseImageMagick = true;
#$wgImageMagickConvertCommand = "/usr/bin/convert";
$wgImageMagickConvertCommand = "C:/Program Files/ImageMagick-6.3.2-Q16/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)

[edit] 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.

  • 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)

[edit] 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?

[edit] 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)

[edit] Success!! Image thumbnailing

-- WonYongTalk 04:43, 4 December 2007 (UTC)

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

Following is my source file:

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

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

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


$wgSVGConverter = 'ImageMagick';

## For more information on customizing the URLs please see:
## http://www.mediawiki.org/wiki/Manual:Short_URL

$wgEnableEmail      = true;
$wgEnableUserEmail  = true;


Following is seemed to be Linux environment

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

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

$wgSVGConverter = 'ImageMagick';

## For more information on customizing the URLs please see:
## http://www.mediawiki.org/wiki/Manual:Short_URL

$wgEnableEmail      = true;
$wgEnableUserEmail  = true;

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

[edit] 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)

[edit] 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:

Image:Nuvola apps important.svg

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

Image:Bad version of svg file.png


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)

[edit] 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)

[edit] 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 '#'.

[edit] 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)

[edit] 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?

[edit] 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)

[edit] 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. :) -- WonYongTalk 04:40, 4 December 2007 (UTC)

[edit] 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)

[edit] 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

[edit] 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:

[edit] 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

[edit] 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|C) 21:26, 8 April 2008 (UTC)


[edit] 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?

[edit] 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.

[edit] 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

[edit] 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)

Personal tools