Help talk:Images and other uploaded files

From Meta, a Wikimedia project coordination wiki
This is an archived version of this page, as edited by 82.18.38.242 (talk) at 16:31, 9 October 2005 (MetaPost diagrams). It may differ significantly from the current version.

Image modification/editing

I'm trying to determine if there's a smooth way to be able to modify the original diagram that produced a gif or jpg. Here's the path I go through to create an image for posting on a Wiki.

  • The diagram is created in OpenOffice Draw.
  • Export diagram to gif format.
  • Upload gif to Wiki.

Now I want to modify the diagram and I go through the cycle again. That's not too bad, but it gets really cumbersome when someone else wants to modify the diagram. The original diagram could be stored in a version control system, but it would be nice to have everything on the Wiki. One solution we are trying is uploading the original diagram to the Wiki and add a link in the gif image page to the original document. Here's the process we have to go through and I think you'll agree it's not very smooth.

  • Select the link to the original document. This brings it up OpenOffice Draw.
  • Make changes.
  • Save original document to local disk.
  • Export to a gif on local disk.
  • Upload original document to Wiki.
  • Upload gif to Wiki.
  • Take a deep breath and feel like there's gotta be an easier way!

Does anyone have a better way to get this done?

PDF upload problems / empty file error

I have modified my localsettings.php as advised, but I cant get some PDF uploads to work. Some PDFs work fine... some don't and I can't see a pattern.

This is the error i get:

The file you uploaded seems to be empty.
This might be due to a typo in the file name.
Please check whether you really want to upload this file.

Solution is here: Uploading_files

File size limit

Is there anyway to change the filesize limit on mediawiki?

--maestrosync who can't be bothered logging in

image attributes without imagemagick

Is it possible to add the height and width attributes to an image without actually resizing the image in imagemagick? I just want to make an image take up less screen space. This is valid HTML, I just don't know how to do it from MediaWiki.

I currently have wgUseImageResize set to false, because I don't have ImageMagick installed.

If I use the tag [[Image:MyImage.jpg|100px]], I get the image at full size with the caption "100px".

If I try setting wgUseImageResize to true, the page dies because it can't find ImageMagick.

How can I specify the height and width tags?

As far as I know, the current code doesn't try to do this; I'm thinking of reorganising that bit of code though, so this may become available in a future version (as a fallback for those without ImageMagick). - IMSoP 14:59, 30 Sep 2004 (UTC)

No protection against (even inadvertent overwriting)

"When a file is uploaded with the same name as an existing one, the old one is replaced. If that is not the intention one has to check in advance that the same name does not exist yet, because currently the system does not warn against overwriting"

  1. This is an unfortunate situation, as it offers no protection against even unintentional overwrites. Metawiki should at the very least offer up a warning that the file in question already exists and prompt the user for replacement. That's assuming that the users are trustworthy.
  2. Will "protecting" the Image "desc" page protect the image?
--Memobug 22:08, 19 Jul 2004 (UTC)
No. But you can still restore the old image. Walter 22:12, 19 Jul 2004 (UTC)

Enable ALL File Extensions For Upload

I'm running a local wiki at work. We want to upload scripts (with various extensions on the default blacklist) and arbitrary filetypes.

I took a belt and suspenders approach here, since I couldn't find any good documentation of this, only the source code itself. I added the following to my LocalSettings.php:

# Enable all file extensions.
$wgCheckFileExtensions = false;
$wgStrictFileExtensions = false;
$wgFileBlacklist = array();

Is there a better way to do this? What exactly does $wgCheckFileExtensions do? It doesn't seem to behave as I'd expect. I haven't tested this much, however. If someone more knowledgeable happens upon this, it'd be good to cover this, with a proper explanation, in the content page.

PatrickFisher 22:24, 11 Nov 2004 (UTC)

Is it possible to upload the images using SCP or at least upload them from a URL rather then the harddrive. (So that I could scp them to a server and then upload more quickly.) On a slow connection uploading images even just a few images one by one is really painful.

- q.

html upload still fails. I get an upload warning of The file is corrupt or has an incorrect extension. Please check the file and upload again. ... ran the html through HTML Tidy to be sure, tried uploading as .xhtml, too. uploaded a pdf without problem. suggestions? -- Adam Katz 17:41, 12 Apr 2005 (UTC)


In my case, uploading, say, a PDF just results in the user being sent straight back to the upload page (with no message, no error, and nothing in the upload log). Uploading images is fine. Since the file upload (and uploaded files capabilities) seem to be very (VERY!) keyed towards images only, is it fair to say that non-image (and perhaps non-ogg) files should not be uploaded?

I'm trying to do the same thing the original poster is (set up a private Wiki and allow sharing/attachment of files to articles). Has anyone been able to get this working?


-- IanSchorr 1:56, 2 May 2005 (UTC)

Try to edit the file includes/DefaultSettings.php and add your extension to $wgFileExtensions

Interlaced/Progressive formats.

Shouldn't interlaced PNGs and progressive JPGs be proposed? See the difference when loading [1] instead of [2] --Hhielscher 17:29, 12 Feb 2005 (UTC)

Linking and embedding

We have a collaborative project using MediaWiki, and need to be able to both include and embed images from another server (the wiki server has neither the space nor the bandwidth to host the images itself). The embedded image needs an alternate text along the lines of "click for an enlarged image" and there should be a link to the enlarged image (which should _not_ be embedded). I expected to be able to do this with

[[media:http://mysite/bigpic.jpg|http://mysite/smallpic.jpg|Click for XGA image (35k)]]

hoping to get an output (in its simplest form) like

<a href="http://mysite/bigpic.jpg"><img src="http://mysite/smallpic.jpg alt="Click for XGA image (35k)"></a>

but what I see is nothing like that. I tried to achieve this without alternate text (I could live without that), but what shows up is a random ">, followed by the small pic. Looking at the source code of the returned page shows that I have got a link to a null URL (just a single space between the quotes), a title in the link tag which is the URL of the embedded image and no reference to the larger image at all.

After a lot of experiment I find that (using the real URLs)

[http://pennine.demon.co.uk/photos/seakayak/xga/Lunga-P7-100-3086.jpg http://pennine.demon.co.uk/photos/seakayak/small/Lunga-P7-100-3086.jpg]

gets me

http://pennine.demon.co.uk/photos/seakayak/small/Lunga-P7-100-3086.jpg

but nothing I have tried seems to work to get an alternate text. Can the documentation explain how to do this ?

See the new Help:Navigational_image#Thumbnail, thanks for the example.--Patrick 12:16, 18 Feb 2005 (UTC)


How to take out the thumb to the small image

Hi, thanks to everybody here. I am proving with chess template in order to add other little figures to improve chess diagrams with explanations. See. [3] How can I take out the thumbs to the little image? thanks. --GengisKanhg (my talk) 22:08, 18 August 2005 (UTC)[reply]

I see two larger tiles on top of a chess diagram, but it is not clear what the intention is, and what the problem is.--Patrick 06:06, 19 August 2005 (UTC)[reply]

Customizing Gallery

Is it possible to change the number of columns gallery uses for displaying thumbnails? I.e., I've got a narrow, fixed width column that my content appears in, and 4 columns of thumbnails is too wide; I'd prefer to be able to force the gallery into a 3 column layout.

Also, although the guide states of the gallery tags, "Using the syntax explained elsewhere on this page gives more control over size...", its unclear exactly how one might change the size of the thumbnails. I took this sentence to mean that something like

Image:Image01gif|95px|Caption

would work, but it doesn't; "95x|" is included in the caption instead.

See my addition.--Patrick 10:17, 5 Mar 2005 (UTC)

Too extensive

This help seems too extensive and partly reduplicative to edit effectively enough.

First, with the title "Images and other uploaded files", this help appears not to be the best place to give the close description of how to upload files and name them, which types of files can be uploaded, and the like. And the default settings of upload is twice told with contents quite alike in the subsection "Uploading non-image files" and in the section "Default settings".

Second, it seems good to depict what things are going with "embedding external images" in a dedicated help elsewhere, especially because the feature is disabled in most projects.

Thirdly, it may be advisable that a separate help is made to describe links to internal, interwiki and external files (image and sound files among others).--Toby (YebisYa) IQUEPPE 03:01, 18 Mar 2005 (UTC)

Extended image syntax enabling?

Does this extended image syntax need to be explicitly enabled? I'm a frequent contributor at Wikipedia, so I use this stuff all the time. But on my new insallation of MediaWiki, when I try to use something like [[Image:My Big Image.jpg|thumb|200px|caption here]] it gives me the full-sized image with a title attribute of "thumb|200px|caption here". Perhaps I need to turn off inline image display? -- Phyzome 16:47, 8 Apr 2005 (UTC)

Using English images in other language Wikipedias

Is it possible to use an image that's in an English Wikipedia article directly in an Esperanto article? I'm trying to translate some articles into Esperanto, and it'd be nice to have the photos without having to reupload them.

Flash (.SWF) Files?

Is it possible to upload Flash files to MediaWiki (altering the LocalSettings.php file that's mentioned in the Help article)? If yes, is it possible to embed them in articles?

I don't believe it is possible right now (as of 1.5 beta1), but I've heard of people who have hacked the appropriate areas to make swf files appear in the proper media tag instead of the image tags like regular images.. so something like this should be on the radar for someone to make as an official feature. One day. =) -- Sy / (talk) 23:56, 28 Jun 2005 (UTC)

MetaPost diagrams

Passionate plea: It would be wonderful to have support for scalable vector graphics via MetaPost. We are already using TeXnology for rendering mathematical formulas, so why not also use the TeX community's very elegant vector graphics engine? In contrast to many other format alternatives (SVG, PDF, etc.), MetaPost was specifically designed to be easy to use when diagrams are edited with plain-text editors. MetaPost graphics should not be uploaded as separate files, they should be included into the main text, as it happens already with mathematical formulas.

MetaPost is well established, widely used, and freely available as portable software. It is a very easy to learn elegant high-level graphics description language that the mp interpreter converts into embedded postscript (which in turn is easy to raster via ghostscript). MetaPost descriptions are ideally suited to be manipulated with a plain-text editor. The language allows authors to select a level of abstraction appropriate for the diagram at hand. -- Markus Kuhn, 9 October 2005

Making images fit the defined area

I have a predefined css for my image and am using the [[Image... to add my image to the left of the document. But this picture is smaller than the defined area. Is there a way to make the image fit inside the box please? something like stretch? Thanks.

Yes, as the page says, you can enlarge with |thumb|width in pixels px|.--User:Patrick | talk 21:57, 24 May 2005 (UTC)[reply]

Can image links be set to open in a new browser window?

I have searched and searched and found nothing about this!!!

Enabling MediaWiki to embed .mov

Never mind

Crop

Is there a way to only display a portion of an image? This would be useful where different parts of the image are useful in different articles. An example is Image:Phase diag iron carbon.PNG, which I'm using as a practical example in austenite, peritectic, and as explanation for the chemical reactions in cast iron and steel. Each of these topics emphasizes a different section of the diagram, so that it would be nice to just give four coordinates and have only a section show in the thumbnail. Can this be done? --en:user:Polyparadigm

Super-sections I and II

I provisionally divided the article into super-sections <32K for easy copying by super section, for editors who cannot copy all at once.--Patrick 07:26, 3 August 2005 (UTC)[reply]

embedding images dynamically generated by external servers depending on template parameters

Wow... what a headline! I'd like to enable automatic map inclusions on wikitravel. We (german wt) use at the moment maps from demis map server. It's possible to generate a variable link in template but i didnt manage to include the map generated from demis depending on the parameters in the query string in the following url:

http://www2.demis.nl/wms/wms.asp?Service=WMS&WMS=BlueMarble&Version=1.1.0&Request=GetMap&BBox={{{1}}}&SRS=EPSG:4326&Width=400&Height=400&Layers=Earth%20Image,Borders,Coastlines&Format=image/gif

where '{{{1}}}' is sth like "40,50,60,70". i tried it with an img src tag and also just as plain url... Is this planned to implement that one day? FlorianKonnertz 05:34, 8 August 2005 (UTC)[reply]

Embedding images without using upload feature?

I have several images, that need to be displayed along with the text for my tutorial pages. I would rather use my ftp client to just upload all the images into an "images" directory rather than using the built in upload function. Then I'd like to embed them in my page rather than just link to them.

Is there any way to do this?
Regards.

See Help:Images_and_other_uploaded_files#Embedding_external_images.--Patrick 20:04, 29 August 2005 (UTC)[reply]

Hotlink prevention breaks image links

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?example\.com(/)?.*$ [NC]
RewriteRule .*\.(gif|jpg|jpeg|bmp|swf|png)$ - [F,NC]

I put these lines in my base .htaccess file, but it breaks image linking for my wiki. I had to put a RewriteEngine off in the wiki directory to get it to work again. Am I doing something wrong here?

Image Page Customization

Hi. I'm considering using the MediaWiki as the engine to run the majority of my website. I'd like to import a lot of images. I don't really like how the image page itself looks. I'd prefer the title to be something besides Image:image1.jpg. Is it an easy modification to allow me to name images whatever I want, like "London Bridge" or something like that? I suppose I could always create an additional page called "London Bridge" and link to the image, but that seems like a waste of resources. Any suggestions? --Boone 13:53, 9 September 2005 (UTC)[reply]

I came up with a hack. Perhaps you can tell me if this will break anything else or cause a security problem. In the content page for the image, I have a line called:

  • Title: London Bridge

Then I added a constructor to ImagePage.php:

function ImagePage( &$title ) {
 global $action;
 Article::Article( $title );
 if ($action=='view') {
  // scan item content for *Title: and use if available
  $strText=Article::getContent(false);
  if (preg_match( '/^\*Title: (.*)$/mi',$strText,$matches))
   $this->mTitle->mPrefixedText=$matches[1];
 }
}

The reason I check for the 'view' action is because other actions like 'watch' were taking the mPrefixedText value and building bad links with it.

--Boone 20:00, 9 September 2005 (UTC)[reply]