Wikipedia talk:Extended image syntax

This is an old revision of this page, as edited by Fabiform (talk | contribs) at 21:35, 6 February 2004 (re html in alt tags). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

I've gone through and added headers to each of the conversations on this page so that it's easier to navigate. Some of them duplicate one another, but I won't presume to rearrange other people's comments just yet. - IMSoP 21:10, 5 Feb 2004 (UTC)


Do you have to provide a thumbnail image?

I'm confused: If you choose 'thumb', do you have to provide a thumbnail image, or is the "thumbnail" actually just a squeezed-up copy of the normal image, or is the Wiki software somehow generating a thumbnail image on the fly, or what? —Paul A 02:14, 30 Jan 2004 (UTC)

The software generates a sized-down image, so it's not just the big image scaled down by the browser. The image is stored on the web server, so it's generated only once to reduce performance impact. -- JeLuF 10:56, Jan 30, 2004 (UTC)


Alternate text is not the same as title text

From the text:
"and the alternate text is used as alt=-attribute for use as mouse popup and for screen reader."
No, no, no, no, NO. The alt attribute is not for mouse popup text. The alt attribute sets alternate text (instead of the image); the title attribute is recommended for use as such things as mouse-over popups (as well as the image). I'm glad to see the software seems to get this right, in as much as the title attribute is being set to the same thing as the alt, but we really shouldn't be encouraging their perception as one and the same. I can see that for most wikipedia purposes a sensible caption will be suitable as both supplementary and replacement, but could the wording on this and any other help pages make clear that this is not the alt= text. [Apologies for going off on a rant. I must be stressed.] - IMSoP 11:54, 30 Jan 2004 (UTC)

OK, I've calmed down long enough to be more wiki-like about this, and gone ahead and changed the page so that it talks about a caption text which is used for more than one purpose. I've reworded various bits to be more precise and/or understandable while I was at it, with the side effect that it may be a bit more verbose. Let me know if you think I've gone too far/done something inappropriate. - IMSoP 12:14, 30 Jan 2004 (UTC)


Eventual move to meta / help namespace

Once this feature is included in a MediaWiki release, this page will need to be moved to meta:MediaWiki User's Guide. In the future, we will need to have a help namespace for MediaWiki-specific pages that would link to the user guide on Meta. --mav 00:20, 31 Jan 2004 (UTC)


Supplying own thumbnail

Would it be possible to extend the new syntax to supply a seperate image to be used as the thumbnail? For some images I optimized the thumbnail manually to provide only a part of the full image to enhance the quality of the small image. For two Examples see my user page in de:.
It should be possible to implement this backward compatible as: [[Image:LargeImage.jpg|Image:OptionalThumbnail.jpg|options|caption]] -- LosHawlos 20:38, 31 Jan 2004 (UTC)

I do that too. In that case, couldn't you just redirect the image page of the small image to the image page of the big image? --mav 00:03, 1 Feb 2004 (UTC)


How to use new Extended Image Syntax

How do I use the new extended image syntax please? I’ve read the Help but it’s still not totally clear how to use it. Here’s a screengrab of the code I’ve used up to now (from the Hawker Hunter article):
 
Can some kind person tell me the new code to replace it? You might need to know that my thumbnail is to be 300 pixels across and my Larger Version is usually 750 pixels across (but both pic sizes can vary depending on the quality and aspect ratio of the source pic). Do I still have to upload a thumbnail myself or does the new code generate it? I need the choice of placing the thumbnail on left or right, for the Hunter pic it needs to be on the right.
Thanks,
Adrian Pingstone 17:51, 30 Jan 2004 (UTC)

Well I would use the following, although it doesn't reproduce what you did exactly:
[[Image:Hunter.black.750pix.jpg|thumbnail|right|300px|A privately-owned Hawker Hunter photographed in England 2003]]
 
A privately-owned Hawker Hunter photographed in England 2003


And no, you only need to upload the large version. Fabiform 18:24, 30 Jan 2004 (UTC)
You can put in the italic and center tags: [[Image:Hunter.black.750pix.jpg|thumb|right|300px|<center>''A privately owned Hawker Hunter, photographed in England in 2003''</center>]] -- Finlay McWalter | Talk 18:31, 30 Jan 2004 (UTC)
Ah, excellent. I'll go and tweak the images I did in the last day then.  :) Fabiform 18:43, 30 Jan 2004 (UTC)
Does this new system not work with special characters? See for example: User:Dori/Sandbox. It appears that this bug has been squashed. Dori | Talk 17:01, Feb 1, 2004 (UTC)
Also, check out the alt text on the right hand image in Dori's sandbox, it displays as:
<center ><strong>Image:Butrint 2.jpg</strong></center >
fabiform | talk 21:01, 30 Jan 2004 (UTC)


Thanks everyone, the new code works fine. Have a look at my first attempt (Morris Marina). I only had to upload the large pic, the thumbnail was created by the code so the work of image uploading is now halved for me. Thanks to whoever coded this improvement.

P.S. I notice that the thumbnail the code makes is a little large, it was 36K compared with the 20K I got when I made the thumbnail. So the new code will have a penalty in page loading times.Adrian Pingstone 23:13, 30 Jan 2004 (UTC)

Left alignment

Is there a way to align left the image on Henri_Druey ? Currently the list interferes with the image (it probably also did in the previous version). -- User:Docu

Yes, there is away to improve the page, just shift the image over to the right where it looks much more natural! It's standard practice on Wikipedia to put the first image on the right so that the beginning of lines are not disrupted. I hope you like the result.
Adrian Pingstone 20:53, 31 Jan 2004 (UTC)
This solves the formatting problem. I usually prefer to have portraits look into the article, e.g. John Adams seems to be looking the wrong way, but Henri_Druey looks o.k. even on the other side. -- User:Docu
I guess I was just lucky that the pic still looks OK on the right. Even so, if the pic is public ___domain, you could flip it horizontally in your graphics program and then the person is looking the other way! I know this would not always look right if medals etc. or any writing got reversed.
Adrian Pingstone 09:56, 1 Feb 2004 (UTC)

<from User talk:Docu>

Personally, I prefer not to do this. BTW I found another solution on Richard_Greene: using <br clear=all> before the list. -- User:Docu
Whoops, too late. I've already flipped John Adams and it looks fine. If you don't want it like that, just revert me. I'm sorry I did something you don't like but reversion is easy because the previous versions are still there.
Adrian Pingstone 10:19, 1 Feb 2004 (UTC)
Unless it's a symmetric object, I'd leave the choice to the painter (or the photographer). Here I don't mind that much, since I picked John Adams primarily because I recalled that the template for US Presidents includes an image and he was just the first one to look to out of the article (BTW the third image in the article even more so). -- User:Docu


</from User talk:Docu>


Feature request

A couple of feature requests, posted at meta, comment if you want Dori | Talk 17:23, Feb 1, 2004 (UTC)

  • Just want to add that I also miss the option of making internal/external links within the caption. I also would prefer using "," as seperator for the options e.g. [[image.jpg|left,350px,thumb|some caption text]]. Great work whoever did this!

Can I get a caption without a thumbnail?

Logo of Digital Equipment Corporation
Logo of Digital Equipment Corporation

Let me be more specific: I expected

[[image:digital_dec_logo.jpg|right|Logo of Digital Equipment Corporation]]

to display a full-sized image with the caption "Logo of Digital Equipment Corporation" underneath it (just as in the thumbnails, but without the magnifying glass).

It didn't do what I expected. Instead, it does what you see. Apparently the caption simply gets thrown away. (Why does MediaWiki think I put the caption there in the first place?) A bug, or functions as designed?

If the latter, is a way for me get it to do what I want? Dpbsmith 22:43, 1 Feb 2004 (UTC)

I agree. Having 'right' or a specified width should tell the software that the last bit of text is a caption and not just alternate text. But in cases where the position or width is not specified the software must treat it the old way and not create a caption. --mav 23:10, 1 Feb 2004 (UTC)
To answer the question, I think it is functioning as designed: the caption text or alt-text or whatever you want to call it is not "thrown away", it is merely acting the same way as the old-style syntax of [[image:digital_dec_logo.jpg|Logo of Digital Equipment Corporation]] would do. In my opinion, using it as title, alt and an inline caption is somewhat overdoing it anyway... - IMSoP 00:52, 2 Feb 2004 (UTC)
There are a lot of articles in Wikipedia that have images or diagrams that are already sized to be displayed as-is, without thumbnails, and which also have captions. As soon as I found out about this new image syntax the very first thing I did was try to create such an non-thumbnail image/caption structure with it, and was puzzled when it didn't. I think it's not at all overkill to display the caption text as a caption too, since that's one of the main things I want to do with images. :) Bryan 00:41, 3 Feb 2004 (UTC)
I had already proposed this before, my proposal was to add a 'caption' keyword to say that you want the alt-text as a caption, or a different caption. That is, [[Image:someimage.jpg|right|Image]] would have no caption and alt-text 'Image' (as it is now), [[Image:someimage.jpg|right|caption|Image]] would have 'Image' both as caption and as alt-text, and [[Image:someimage.jpg|right|caption:A crappy thing|Image]] would have 'Image' as alt-text and 'A crappy thing' as caption. JeLuF seemed not to think it would be useful, unfortunately. Andre Engels 18:46, 3 Feb 2004 (UTC)
I think that sounds like a good idea, Andre - my point about overkill was that the more purposes you try and fulfill with the same piece of text, the more likely you are to fail in one of those purposes. This is why I was annoyed at the use of alternate text to cover both title and alt attributes (see above).
Talking of which, I hope I haven't caused unnecessary confusion by replacing that with caption text in the syntax descriptions; it was meant to apply generically to the 2 or 3 uses that text has, but does rather sound like it will be displayed as an inline caption. Sorry if this is what people thought it meant. - IMSoP 21:21, 5 Feb 2004 (UTC)
It confused me all right. I and another author spent some time trying to get the "caption" to display on the Stratocaster images. It didn't occur to us that the meaning of "caption" had changed to mean alt text. Suggest reword if not already done to be consistent with previous usage. Andrewa 02:27, 6 Feb 2004 (UTC)
I agree it should be reworded to avoid confusion, but I strongly disagree with returning to previous usage, for reasons stated near the top of this page. - IMSoP 02:30, 6 Feb 2004 (UTC)
Hmmm. In a sense you are quite correct, a caption is a description of an image, so a good alternate text and a good subtitle are both examples of captions. But personally, I think you're just creating problems by changing its established usage within Wikipedia. The aim is to be understood, surely.
Confusing people will just discourage use of the new syntax. I'll be interested to see your rewording. Andrewa 03:01, 6 Feb 2004 (UTC)
Well, my original intention was simply to pick a more appropriate term for the text in both versions of the image syntax - however established it may be, the use of the term alt-text in Wikipedia contradicts that defined by web standards bodies (it is used for other purposes besides the alt attribute). I can see now that caption text was an ambiguous choice of replacement, but still hold that a new term is needed which covers all uses. - IMSoP 03:26, 6 Feb 2004 (UTC)
<- resetting the indent to none...

Hmmmm. I've missed something here. Why is this 'new' term needed?

I've never once used the same text both as subtitle (previously called caption) and alternate text. Has anyone? They serve significantly different purposes.

Now if we must have such a term, how about image description text? The previous useage of caption within Wikipedia is important. Sure, it's good to be in step with the test of the Web too. But not at the expense of making it difficult for us to write and edit articles.

And I still preach caution. How will this term help to understand or clarify anything, when what it describes doesn't seem to be the way Wikipedia works, anyway? Food for thought? Andrewa 12:21, 6 Feb 2004 (UTC)

Firstly, I think image description text sounds like a good term - or even just description. Secondly, I will try and explain why it is necessary. Before I edited, the first paragraph included the statement "and the alternate text is used as alt=-attribute for use as mouse popup and for screen reader." This immediately struck me as an example of a common misunderstanding, well explained by the Mozilla FAQ [1] - I could probably find an authoratitive statement from the W3C if I had time. In short, the alt attribute is not intended for mouse popoup/tooltip. However, the error in the statement with regard to Wikipedia's usage was not that no tooltip was displayed, since the title attribute is also set, for convenience, to the same description - providing a tooltip identical to the alt text on many browsers. I therefore wanted to stress that this was one piece of text being used for multiple purposes, rather than perpetuate the myth that this is all part of the job of the alt attribute. Caption was a bad choice, description is better, but alt-text is fundamentally incorrect.
(for an example of the misunderstanding being perpetuated, see the bottom of this talk page: "However the ALT text which shows when the mouse hovers over the image...")
IMSoP 14:16, 6 Feb 2004 (UTC)

Could someone help fix... / standard thumbnail width

Could someone vistit Monument to the Royal Stuarts, and fix the nifty magnifying glass thing, which I copied from Athens, so that it leads to the big version of the photo as it is supposed to. The big version is uploaded as [[Image:ac.stuarts.jpg]] and the small version as [[image:ac.stuarts2.jpg]]. Obviously I have missed a step in the process somewhere. Adam 11:41, 1 Feb 2004 (UTC)

With the new version, you need just one picture. I changed it on the page. Hope you like the result. -- User:Docu

Many thanks. So I just upload the big version, and then specify in the edit box the width I want the small version to appear as, is that correct? Adam 11:54, 1 Feb 2004 (UTC)

  • Yes, but I haven't tried out all options yet. A quick way to do it, seems to be [[Image:ac.stuarts.jpg|thumb|Monument to the royal Stuarts, Rome]] -- User:Docu
Have you been here yet: Wikipedia:Extended image syntax? There are examples of the different options that you can copy and paste.  :) fabiform | talk 13:40, 1 Feb 2004 (UTC)
Here's the code I'm now using for a large pic with its associated thumbnail, it seems to work fine:
[[image:yourfilename.jpg|thumb|right|300px|<center>yourpicturetitle</center>]]
Put double apostrophes around the picture title to give the italics.
DON'T UPLOAD A THUMBNAIL, the new code does it for you.
The result is a centred, italicised, caption and a nice-looking thumbnail 300 pixels wide and set on the right of the article. Go to Morris Marina to see how it all turns out.
Can I suggest that 300 pixels be the standard thumb width, it makes a thumbnail big enough so that the reader is not forced to view the big pic but not so big that the text is squeezed into a narrow channel on an 800 by 640 screen.
Adrian Pingstone 15:28, 1 Feb 2004 (UTC)
I second this suggestion. A standard width of 300px would be perfect. Hadal 16:32, 1 Feb 2004 (UTC)


Image position

There is now acres of white space next to the picture at the top of this page (at least on my not-excessively-high-res screen). A similar thing is occuring at Hutton Inquiry. Is this due to the new image markup? Could it be changed so that the text wraps around the pictures like it used to... I think it is less ugly that way. Pete/Pcb21 (talk) 08:23, 2 Feb 2004 (UTC)

It still wraps around the pictures just like it used to for me. While you're waiting for the techies to arrive, perhaps you should say what operating system and browser you're using... those are usually the first questions. (What I did to the Hutton Inquiry must look really bad on your machine, sorry!). fabiform | talk 09:10, 2 Feb 2004 (UTC)
IE 5.5 on Windows NT. (It doesn't look great - but I am slowly learning not to fly off the handle about these things - if something needs to be fixed then it will be soon enought) Pete/Pcb21 (talk) 09:15, 2 Feb 2004 (UTC)
This was causing the problem: <br clear=all> It was inserted when Hutton's picture was moved to the left. I have removed it, and now the text should wrap properly. --Minesweeper 09:17, 2 Feb 2004 (UTC)
I left it there when I moved the pic to the right again assuming it served a useful purpose... sorry. But you said the pic looked all wrong on the village pump as well? fabiform | talk 09:32, 2 Feb 2004 (UTC)
Post hard refresh (ctrl+f5) it now appears fine on both this and the Hutton page. I don't know if there has been a change on this page or if it was just the refresh that sorted something. Thanks for all your help guys. Pete/Pcb21 (talk) 10:04, 2 Feb 2004 (UTC)
Oddly, it seems I have to hard refresh every time I come to this page to get the correct layout. i.e. I load the page, get whitespace, hard refresh, no whitespace. Something local to me? Something squidy? Something with the new image code? Pete/Pcb21 (talk) 12:11, 2 Feb 2004 (UTC)


Code for pics in a column

Help, please, with putting 5 pics in a column on the page. In Sistine Chapel I need to know the new code to put the 5 pics in the same vertical arrangement as you see on the page now.
Thanks.
Adrian Pingstone 11:18, 2 Feb 2004 (UTC)

I tried a version, leaving the <div> in. Personally I would probably have kept the previous version, it looked great already. -- User:Docu
Thanks for your help, that's exactly what I wanted (and I'm sorry I made you type it all in!). I wanted to change to the new code because if we have a mixture of the old and the new look in different articles, then (IMHO) Wikipedia is going to look amateur.
Will anyone else tell me if they think a mixture of the two pic styles (not within the same article, of course) is OK?
Adrian Pingstone 13:11, 2 Feb 2004 (UTC)
Please don't post screenshots of wikitext. Just surround the text with <pre> and </pre>. Especially not as a 43 KB JPEG. -- Tim Starling 13:18, Feb 2, 2004 (UTC)
Sorry, screenshot removed.
Adrian Pingstone 16:09, 2 Feb 2004 (UTC)
Shouldn't that be <nowiki></nowiki>? - IMSoP 17:03, 2 Feb 2004 (UTC)
Either way, they have basically the same function. <pre> is better for preserving line breaks, and uses a fixed rather than proportional font. e.g.
<div style="float:right; margin-left:10px; margin-right:10px; width:200px; text-align:center">
[[image:sistine.chapel.entire.500pix.jpg|200px|none|thumb|''The interior of the Sistine Chapel'']]
-- Tim Starling 23:43, Feb 2, 2004 (UTC)


Bug in the image resize code

Sennheiser points out a problem with the new image resize feature. Please see Igor Kurchatov to fully understand the problem.

Is that <center> tag allowed? If you take it out, the problem goes away. Not sure the new thumbnail feature allows that formatting. Fuzheado 14:47, 3 Feb 2004 (UTC)
the center is fine (although it shows in the alt text!), the problem is the "". I just chucked the pic in the Wikipedia:Sandbox with the "" and then replaced them with ', and it worked. You can't wikify the caption either, and I imagine that you might have a problem if the caption should read thumb, or right.  ;) (Wonderful beard, by the way!) fabiform | talk 14:52, 3 Feb 2004 (UTC)


"Thumb" image function annoyingly buggy

At least in my prefered browser Opera, the "thumb" function for images seems not to be producing the desired results. The smaller version of the pic is in the article all right, but the little "enlarge" icon is seldom anywhere near the pic, sometimes paragraphs away, often over irrelevent text. Could we please stop converting images to this new system until it works better? Thanks, -- Infrogmation 05:47, 4 Feb 2004 (UTC)

No such problem in my current version of Opera 7.50 preview. Jor 17:19, 4 Feb 2004 (UTC)
Take a look at the front page of wikipedia on the Macintosh version of Internet explorer 5. It looks terrible, but it works fine on every other browser so we haven't done anything about it. Perhaps you could find another browser(s)? Mabye one that is open source. Or, you could just use Internet explorer 6. Sennheiser cringes at this suggestion, deciding to strike it out and replace it with an advertisement for the Mozilla Firebird .7 browser. Sennheiser! 22:11, 5 Feb 2004 (UTC)

Delete "thumbs"?

Take the iMac article. Please I don't want it. Sorry. Take a glance at the iMac article. It has a large "thumbnail", and a link full-sized version. Should the "thumbnail" be deleted, and replace with this code, or do we leave it as is, and only apply this code to new uploads? - user:zanimum

It's quick to change to the new code so I've done it. Looks good, I think. The original 300px thumbnail looked far too big (becaise the pic is almost portrait format) so I've used a 250px thumb. For landscape formats, 300 px remains best.
Adrian Pingstone 17:14, 6 Feb 2004 (UTC)

Don't like it

I'm sorry, but I really don't like this new thimbnail thing and I'm going to be very rude about it for which I apologise in advance. The magnifying glass icon is just horrible. Having it stuck in the bottom right corner pushes the caption to one side making them (and the whole picture) look lobsided. The Hutton Inquiry just looks awful. Can we not make it look more like a normal image and have an enlarge link underneath above or somewhere else other than stuck in the corner? Mintguy (T)

I don't like it either. This new syntax doesn't do what I want at all. Nearly all of the articles to which I've added images merely want an image to the left or right, with the text wrapped around, and a caption. The new syntax just clutters the page, in fact I find it downright ugly.
It may work really well for taxboxes and the like where the size of the image is strictly limited, and linking to a larger version is good. But IMO there's still a need for a new syntax to do the simple things more simply.
Maybe this one can be extended to do it, but it sounds a risk, doesn't it? Maybe better to start from the ground up, and KISS. Meantime I guess I have no choice but to continue using the old method. Pity. Andrewa 02:40, 6 Feb 2004 (UTC)

I strongly disagree. The magnifying glass is very intuitive and helpful. If you don't want a zoom, don't scale down the image! The only thing I would change is italicize the caption by default.—Eloquence 12:26, Feb 6, 2004 (UTC)

Hmmm. I think that should have been indented. What are you strongly disagreeing to? All I'm asking for is an easy way of doing what we've been doing for years with difficulty, and achieving good results in the process. Those who like this new syntax and its results are free to use it, and I'm sure they'll use it well. NB the comment immediately below this, although now indented one more than this, actually refers to my comment further up. Andrewa 13:52, 6 Feb 2004 (UTC)
If you don't like the frame around the thumbnail, don't use it.
Then I get no whatever-it's-now-called-but-it-used-to-be-a-caption, and I normally want one. Andrewa 13:52, 6 Feb 2004 (UTC)

[[Image:Giant Panda.jpg]] gives you the full image:

 

[[Image:Giant Panda.jpg|thumb|150px|Panda]] gives the new thumnail:

 
Panda

But [[Image:Giant Panda.jpg|150px|Panda]] gives a clickable thumnail without the boarder. You'll have to stick it in a table and add a caption if you want one though:

 

Thus:

{| align=right
|[[Image:Giant Panda.jpg|200px|Panda]]
|----
|align=center|A panda <br>''(click image to enlarge)''
|}

Gives you:

 
A panda
(click image to enlarge)

--fabiform | talk 06:07, 6 Feb 2004 (UTC)

HTML tags show in ALT text

See e.g. Ko Phi Phi Lee, there the image caption was made in italics using something like [[Image:Ko Phi Phi Lee.jpg|thumbnail|150px|none|''Mahya Bay'']]. However the ALT text which shows when the mouse hovers over the image then shows <em>Mahya Bay</em>, which is a bit ugly. Thus we either have to avoid anything except plain text in the description, or the HTML tags need to be stripped in the ALT text. andy 10:38, 6 Feb 2004 (UTC)

I've noticed this too. I often see <center></center> in the alt text on these new thumbnails. Using <em></em> is a bit silly though as you could use ''double apostrophes'' which would look like "quote marks" in the alt text - perfect! fabiform | talk 21:35, 6 Feb 2004 (UTC)