Wikipedia talk:Extended image syntax: Difference between revisions

Content deleted Content added
from the village pump
m Archiving 1 discussion(s) to Wikipedia talk:Extended image syntax/Archive 4) (bot
 
(762 intermediate revisions by more than 100 users not shown)
Line 1:
{{talkheader| search= yes}}
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?
{{WikiProject banner shell|
—[[User:Paul A|Paul A]] 02:14, 30 Jan 2004 (UTC)
{{Wikipedia Help Project|class=NA|importance=low}}
: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. -- [[User:JeLuF|JeLuF]] 10:56, Jan 30, 2004 (UTC)
}}
{{User:MiszaBot/config
|archive = Wikipedia talk:Extended image syntax/Archive %(counter)d
|algo = old(90d)
|counter = 4
|maxarchivesize = 90K
|archiveheader = {{Talk archive navigation}}
|minthreadstoarchive = 1
|minthreadsleft = 4
}}
 
{{Archivebox| auto= yes| search= yes}}
----
From the text:<br/>
''"and the alternate text is used as alt=-attribute for use as mouse popup and for screen reader."''<br/>
No, no, no, no, ''NO''. The ''alt'' attribute is '''not''' for mouse popup text. The ''alt'' attribute sets '''''alt'''ernate 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.] - [[User:IMSoP|IMSoP]] 11:54, 30 Jan 2004 (UTC)
 
== Undocumented: muted and loop options for videos; others? ==
: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. - [[User:IMSoP|IMSoP]] 12:14, 30 Jan 2004 (UTC)
 
[[File:Mengerzugendlossequenz 2880p60 20200226 color CRF04.webm|thumb|loop|A <code>loop</code> video]]
-----
[[File:Cat piano with audio 3EB0CD1F.webm|thumb|muted|A <code>muted</code> video]]
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. --[[User:Maveric149|mav]] 00:20, 31 Jan 2004 (UTC)
[https://gerrit.wikimedia.org/r/c/mediawiki/services/parsoid/+/816208/1 A couple of years ago], the <code>loop</code> and <code>muted</code> keywords were added to codebase. Examples to the right.
 
These are not documented. Which makes me wonder, if there are other important undocumented options...
----
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 [http://de.wikipedia.org/wiki/Benutzer:LosHawlos see my user page in de:].<br>
It should be possible to implement this backward compatible as: <tt><nowiki>[[Image:LargeImage.jpg|Image:OptionalThumbnail.jpg|options|caption]]</nowiki></tt> -- [[User:LosHawlos|LosHawlos]] 20:38, 31 Jan 2004 (UTC)
 
Should I go ahead and add these to the page?
: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? --[[User:Maveric149|mav]] 00:03, 1 Feb 2004 (UTC)
--[[User:Nanite|Nanite]] ([[User talk:Nanite|talk]]) 17:15, 26 February 2024 (UTC)
 
:They are documented: [[mediawikiwiki:Extension:TimedMediaHandler#Syntax_synopsis]] —[[User:TheDJ|Th<span style="color: green">e</span>DJ]] ([[User talk:TheDJ|talk]] • [[Special:Contributions/TheDJ|contribs]]) 19:25, 14 April 2024 (UTC)
::{{ping|TheDJ}} ah sorry I missed your reply. I mean to suggest they should be documented on this page. --[[User:Nanite|Nanite]] ([[User talk:Nanite|talk]]) 22:56, 17 March 2025 (UTC)
 
== How to use''link'' to a newspecific ExtendedDjVu/PDF Imagepage? Syntax==
How do I use the new [[Wikipedia:extended image syntax|extended image syntax]] please? I&#8217;ve read the Help but it&#8217;s still not totally clear how to use it. Here&#8217;s a screengrab of the code I&#8217;ve used up to now (from the [[Hawker Hunter]] article):<br>
[[Image:screeenshot.oldcode.arp.jpg]]<br>
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. <br>
Thanks,<br>
[[User:Arpingstone|Adrian Pingstone]] 17:51, 30 Jan 2004 (UTC)
 
The {{para|page}} parameter allows selecting a specific page in a DjVu/PDF file when ''displaying'' an image (example: <code><nowiki>[[File:Alice in Wonderland.djvu|thumb|page=5|Page 5 from ...]]</nowiki></code>). However, this does not work for ''linking'' to a specific page:
:Well I would use the following, although it doesn't reproduce what you did ''exactly'':<br>
* <code><nowiki>[[:File:Alice in Wonderland.djvu|page=5|p.&amp;nbsp;5]]</nowiki></code> gives "[[:File:Alice in Wonderland.djvu|page=5|p.&nbsp;5]]" with a wrong text and a link to the whole file instead of its specific page.
:<nowiki>[[Image:Hunter.black.750pix.jpg|thumbnail|right|300px|A privately-owned Hawker Hunter photographed in England 2003]]</nowiki><br>
* <code><nowiki>[[:File:Alice in Wonderland.djvu?page=5|p.&amp;nbsp;5]]</nowiki></code> gives "[[:File:Alice in Wonderland.djvu?page=5|p.&nbsp;5]]" with correct text but a wrong link with [[percent-encoding|percent-encoded]] <code>?</code> symbol.
[[Image:Hunter.black.750pix.jpg|thumbnail|right|300px|A privately-owned Hawker Hunter photographed in England 2003]]<br clear=all>
Is there a valid wiki syntax or a helper template to achieve this without using an "external link" (<code><nowiki>[https://en.wikipedia.org/wiki/File:Alice_in_Wonderland.djvu?page=5 p.&amp;nbsp;5]</nowiki></code>)? — [[User:Mikhail Ryazanov|Mikhail Ryazanov]] ([[User talk:Mikhail Ryazanov|talk]]) 21:50, 17 March 2025 (UTC)
:And no, you only need to upload the large version. [[User:Fabiform|Fabiform]] 18:24, 30 Jan 2004 (UTC)
: Found the template myself (accidentally): {{tlx|PDF page link|file{{=}}Alice in Wonderland.djvu|page{{=}}5|text{{=}}p.&amp;nbsp;5}} gives "{{PDF page link|file=Alice in Wonderland.djvu|page=5|text=p.&nbsp;5}}". No wiki syntax apparently exists. — [[User:Mikhail Ryazanov|Mikhail Ryazanov]] ([[User talk:Mikhail Ryazanov|talk]]) 02:52, 24 March 2025 (UTC)
 
== Specifying image dimensions for OpenGraph metadata ==
:: You can put in the italic and center tags: <nowiki>[[Image:Hunter.black.750pix.jpg|thumb|right|300px|<center>''A privately owned Hawker Hunter, photographed in England in 2003''</center>]]</nowiki> -- [[User:Finlay McWalter|Finlay McWalter]] | [[User talk:Finlay McWalter | Talk]] 18:31, 30 Jan 2004 (UTC)
 
The article on [[Kat Abughazaleh]] has an image, [[commons:File:Kat_Abughazaleh_2_(portrait_cropped).jpg|a portrait photo of the subject]] that a contributor cropped from [[commons:File:Kat_Abughazaleh_2.jpg|a larger photo]], in the infobox. When social media sites extract metadata from that page via OpenGraph and prefer a landscape-oriented image ([https://bsky.app/profile/spm1961.bsky.social/post/3lolwbe7qbc2m example]), the default dimensions/crop are sometimes pretty suboptimal, displaying the person's nose and mouth but truncating the eyes.
:::Ah, excellent. I'll go and tweak the images I did in the last day then. :) [[User:Fabiform|Fabiform]] 18:43, 30 Jan 2004 (UTC)
 
Off the top of my head, I can imagine a few ways of fixing this:
::::Does this new system not work with special characters? See for example: [[User:Dori/Sandbox]]. [[User:Dori|Dori]] | [[User talk:Dori|Talk]] 20:37, Jan 30, 2004 (UTC)
 
# Include two images on the page; use <code>class=pageimage</code> and <code>class=notpageimage</code> to override the [[mediawikiwiki:Extension:PageImages|Page Images]] selection criteria so that one goes into the social media preview and the other is actually displayed to those who visit the page
::::::Also, check out the alt text on the right hand image in Dori's sandbox, it displays as:<br> '''&lt;center &gt;&lt;strong&gt;Image:Butrint 2.jpg&lt;/strong&gt;&lt;/center &gt;'''<br>[[User:Fabiform|fabiform]] | [[User talk:Fabiform|talk]] 21:01, 30 Jan 2004 (UTC)
# <nowiki>replace the current image with the prior uncropped image, use {{</nowiki>[[Template:CSS image crop|CSS image crop]]<nowiki>}} or {{</nowiki>[[Template:Annotated image|Annotated image]]<nowiki>}} to crop it appropriately for portrait display in the infobox, so that the re-cropping by OpenGraph has more to work with</nowiki>
 
I welcome advice! [[User:Sumanah|Sumana Harihareswara]] 15:24, 13 May 2025 (UTC)
 
== Centre a caption? ==
:::::::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.<br>
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.[[User:Arpingstone|Adrian Pingstone]] 23:13, 30 Jan 2004 (UTC)
 
Is there a way to centre align (or centre justify) a caption below an image? [[User:Spideog|Spideog]] ([[User talk:Spideog|talk]]) 14:48, 5 June 2025 (UTC)
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.<br>
:[[User:Arpingstone|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