Template talk:Image label begin

Latest comment: 5 months ago by Hairy Dude in topic Text flow on mobile

Border edit

Can a border and caption parameters be added to the Image? -- Ganeshk (talk) 19:01, 1 November 2006 (UTC)Reply

I am guessing it can but especially only applied to the outer div that should not affect the inner one. For example, line-height css style can cause a slight offset when pronounced by floating right. Caption is to be placed between the inner and outer one as well at the bottom. These should be optional because some people may want just the plain labelled image without any extras. -- Zondor 02:41, 2 November 2006 (UTC)Reply
I just added this. You'll want to use the {{Image caption}} template. Also, the border should be set to something like border=#000000 1px solid.  X  S  G  03:03, 26 January 2009 (UTC)Reply
This is a rather poor solution and the result doesn't follow standard image caption style and layout. Surely there should be a way of including a image caption by adding a parameter to the template? — Blue-Haired Lawyer 11:20, 5 April 2009 (UTC)Reply
Make the capability to add a border and a caption for a image. Русские идут! (talk) 10:46, 5 June 2011 (UTC)Reply

Justify edit

Automatically setting text align to justify, an option available in preferences, makes this template look awful. See for example European Union member state, with the option enabled. Having a margin should solve this. --User:Krator (t c) 22:41, 18 June 2007 (UTC)Reply

Documentation/implementation problems edit

This is an interesting way of labeling images. Kudos to whoever came up with the idea! However in the documentation I see that the scaling feature is not implemented correctly, and the documentation is inconsistent in describing how the x/y values are being used. As it is documented, it only works for square images. Let me illustrate...

Per the documentation, this example code should result in the word "CENTER" appearing in the center of the image:

 {{Image label begin|image=Kansas Locator Map.PNG|width={{{width|426}}}|float={{{float|none}}}}}
 {{Image label|x=0.5|y=0.5|scale={{{width|426}}}|text=CENTER}}
 {{Image label end}}

But because it isn't a square image, it produces this instead:

This occurs because the template applies the same scaling factor to both x and y values. Since the width and height is not the same, this is not the correct way to do it. To work using a single scaling factor, the scaling factor must be a multiple of the original width and not just the new width. This also means that the x and y values should be the actual coordinates. In the above example, it should be coded like this (the image is 426x224):

 {{Image label begin|image=Kansas Locator Map.PNG|width={{{width|426}}}|float={{{float|none}}}}}
 {{Image label|x=213|y=112|scale={{{width|426}}}/426|text=CENTER}}
 {{Image label end}}

Yielding:

Which works even when the width is increased to 600px:

Mike 08:40, 1 January 2008 (UTC)Reply

Your proposed solution merely provides a way to use actual pixel coordinates instead of percentages. The trick with the original percentage-based solution is that the Y values are relative to the width of the image, as you note -- so Y=1.0 is not the bottom of the image but rather the same distance from the top as the image is wide. Not ideal, but no harder than your method. Powers T 20:03, 15 July 2011 (UTC)Reply

centering edit

Can the ability to center the labeled image be included? It would be much appreciated --Lvivske (talk) 20:34, 10 June 2009 (UTC)Reply

I'll make a try. Rursus dixit. (mbork3!) 16:17, 2 May 2011 (UTC)Reply
No, I changed my mind: I won't try it. The previous posting explains why: it doesn't work with image labels or is too complicated. Another day, in a test template, perhaps. Rursus dixit. (mbork3!) 16:20, 2 May 2011 (UTC)Reply
@Rursus: Take it easy, you can just input |margin=0 auto to get this effect. --Great Brightstar (talk) 15:20, 12 February 2019 (UTC)Reply

navbar edit

I added {{navbar}} [1] and K._Richards_II (talk · contribs) reverted me[2] because my hack was very badddd.

The reason I added the navbar here is that the Oceania map included it.[3]

I think we should add a param (like 'navbar_template_name') which, when populated, adds a navbar. John Vandenberg (chat) 02:43, 15 April 2011 (UTC)Reply

Breakage on Mobile edit

Hello! Pages using this template 'break' on Mobile Web - they activate horizontal scroll, and don't scroll like all other thumbnails. This can be fixed by replacing 'width' in the template with 'max-width' and by adding a 'overflow-x: auto' to it. Problem ofcourse, is that IE6 does not support max-width, so using max-width will break this template on IE6. There are apparently some IE6 specific hacks available to make that work, but since I don't have access to IE6, can't test it. Hopefully someone else can fix this at some point. YuviPanda (talk) 21:44, 24 December 2013 (UTC)Reply

Don't link to file page by default edit

Any objections to change the default of the link parameter to empty (don't link the map image anywhere)? There are multiple advantages over the status quo (linking to the local file description page):

  • they would end up with an image of an empty map (no labels), when they probably just wanted to enlarge the map - confusing and not helpful
  • easy to miss a label when clicking on it and end up on the image page instead of the article, which is even more confusing
  • an empty link signals that this is a decorative image, which is not entirely correct, but still gives the right idea to all the tools relying on it, which would otherwise try to process this image and fail badly due to all the CSS trickery involved.

--Tgr (WMF) (talk) 21:50, 14 May 2014 (UTC)Reply

OK I was already implemented in the sandbox page, but that need an administrator to responce. --Great Brightstar (talk) 17:11, 28 November 2018 (UTC)Reply

Wikilink underlining edit

Is there a reason the template has been set up so that wikilinks in the annotations don't get underlined? --JFH (talk) 16:57, 18 August 2014 (UTC)Reply

Change some CSS properties edit

I think the following CSS properties should be changed from main template:

  • max-width - should be compeletely removed, which was already provided by "noresize" class.
  • overflow-x - should be removed too, or available only via a parameter (see the sandbox page).

Since these properties becomes duplicate, they're necessary to consider. --Great Brightstar (talk) 17:47, 28 November 2018 (UTC)Reply

  Not done: please make your requested changes to the template's sandbox first; see WP:TESTCASES. Izno (talk) 22:41, 29 November 2018 (UTC)Reply

Second parameter for border edit

I introduced |border2= to add a border, this is works by means of extended image syntax, without any CSS styles, anyone who want to use this border would be allowed to access via this parameter. See the test cases. --Great Brightstar (talk) 14:54, 12 February 2019 (UTC)Reply

  Done -- /Alex/21 15:00, 12 February 2019 (UTC)Reply

Request for a feature to change the width edit

The width of image area will be 2 pixels wider if |border2=yes is added, which could cause a bit overflow behavior in the template. To avoid this problem, the |width= parameter should automatically add 2 pixels. The source codes is available at sandbox page. --Great Brightstar (talk) 16:38, 15 February 2019 (UTC)Reply

@Great Brightstar:   Done.  — SMcCandlish ¢ 😼  20:52, 17 February 2019 (UTC)Reply

Semi-protected edit request on 6 July 2023 edit

The 10th largest city in population is now Austin Texas and it should replace San Jose California pinned as the 10th largest city on the US map. 2603:8081:2700:5B2A:CFF:7D66:931B:D133 (talk) 04:18, 6 July 2023 (UTC)Reply

  Not done: Procedural decline. The template can only be edited by template editors. Please resubmit as a template-protected edit request. Heart (talk) 04:29, 6 July 2023 (UTC)Reply

Semi-protected edit request on 29 August 2023 edit

2A01:5EC0:7808:B6E0:38C6:868B:3747:23CE (talk) 06:52, 29 August 2023 (UTC)Reply

  Not done: it's not clear what changes you want to be made. Please mention the specific changes in a "change X to Y" format and provide a reliable source if appropriate. We cannot insert images hosted elsewhere ("hotlinking"), mostly for copyright reasons. Please see Wikipedia:Images for more info. Victor Schmidt (talk) 12:52, 29 August 2023 (UTC)Reply

Text flow on mobile edit

See Tornquist Sea#Geologic evolution. Unlike with a regular image, text is allowed to flow around these templates in portrait orientation on mobile, which results in an unreasonably narrow text column. Ideally it should also be centred, but that would look wrong on desktop, so that style should only apply on narrow screens. Hairy Dude (talk) 12:07, 26 November 2023 (UTC)Reply