Template talk:Wide image

From Wikipedia the free encyclopedia

border=no[edit]

Roadster photographed with a 0.43 m telescope of Dubbo Observatory in Australia, on 8 February 2018, 16:29-16:50 UTC, at a distance of 550,000 km (1.4 Lunar distances) from Earth

The image above is used at Elon Musk's Tesla Roadster. It uses border=no but as you can see it still has a drop shadow. Would it be possible to remove the shadow when using a borderless image? nagualdesign 16:52, 10 February 2018 (UTC)[reply]

nagualdesign, I don't see any borders or shadows. can you provide more information (browser, OS, screenshot, ...) Frietjes (talk) 17:15, 10 February 2018 (UTC)[reply]
I'm using Internet Explorer 11. Here is a screenshot. At 125% zoom there's also a thin grey line beneath the image container. I've just checked, and the problem is identical in Google Chrome. nagualdesign 17:28, 10 February 2018 (UTC)[reply]
no shadow on Chrome on Linux ... 76.127.20.109 (talk) 19:08, 10 February 2018 (UTC)[reply]
FWIW, I'm using Windows 10. nagualdesign 19:23, 10 February 2018 (UTC)[reply]
@Nagualdesign: I made a small improve in sandbox page just now. Hopefully it would fix that. --Great Brightstar (talk) 01:32, 14 March 2018 (UTC)[reply]
OK, so can you reproduce with {{Wide image/sandbox}}? I can't see it even if I tested with IE 11.248.16299.0 on Windows 10. --Great Brightstar (talk) 11:14, 15 March 2018 (UTC)[reply]

Support for upright[edit]

If a qualified editor cared to take on modification of this template to support "upright" image scaling as per File:, that would be a tremendous contribution to the implementation of the image size user preference. Given the widespread usage of the template, this will have to happen eventually if Wikipedia takes the user preference seriously; and there's no time like the present. ―Mandruss  20:07, 5 May 2018 (UTC)[reply]

The policy WP:IMGSIZE states (emphasis not added):

Except with very good reason, do not use |px (e.g. |thumb|300px), which forces a fixed image width. In most cases upright=scaling factor should be used, thereby respecting the user's base preference (which may have been selected for that user's particular devices).

There is no very good reason to use fixed sizes for larger images; in fact the user preference is arguably even more important for larger images. ―Mandruss  20:55, 5 May 2018 (UTC)[reply]

Support this request for wide_image and multiple_image (if possible). Thanks. -SusanLesch (talk) 18:40, 6 December 2020 (UTC)[reply]

Can't scroll on mobile browser[edit]

Today I found the image becomes no scrollable on mobile page, but when I switched to desktop mode, it works. What happened to the mobile frontend? Great Brightstar (talk) 07:45, 10 August 2018 (UTC)[reply]

@Great Brightstar: works for me. Can you be more specific ? Which image on which page, with which browser ? —TheDJ (talkcontribs) 07:55, 10 August 2018 (UTC)[reply]
@TheDJ: Yes, I just want to update for LibreOffice, but suddenly I found the timeline image become unscrollable that I can't scroll to left or right with finger, later I saw the problem again at the template page, all of images were affected. I used Firefox 61.0 on Android. --Great Brightstar (talk) 08:12, 10 August 2018 (UTC)[reply]
I reported in phab:T202210. Great Brightstar (talk) 01:10, 19 August 2018 (UTC)[reply]
@TheDJ: I think I got the solution for this, in the sandbox page I've just moved "noresize" into an internal element, then the sandbox works in test cases if I open with Fennec. The same implementation is already made in {{Panorama}}. So please copy the source code from sandbox page. Great Brightstar (talk) 15:51, 22 August 2018 (UTC)[reply]
okay, I made the change. please revert if there is a problem. Frietjes (talk) 18:10, 22 August 2018 (UTC)[reply]
Thank you. 🤝 Great Brightstar (talk) 00:02, 23 August 2018 (UTC)[reply]

Dropping margin-bottom property while the outer border is removed[edit]

This template currently uses thumb property all the time, even if the outer border is removed via a parameter, however this class brings the following property:

margin-bottom:0.5em 

If you think this margin is unnecessary, copy my source code from sandbox page. --Great Brightstar (talk) 19:10, 26 January 2019 (UTC)[reply]

 Done -- /Alex/21 01:34, 27 January 2019 (UTC)[reply]

Fix regression[edit]

What the last edit caused a regression makes the template shifted to right in case 7 while I saw the test cases page, I made a bugfix at the sandbox page. --Great Brightstar (talk) 18:31, 22 February 2019 (UTC)[reply]

@Great Brightstar: test case 7 appears to still have an issue. — xaosflux Talk 18:11, 23 February 2019 (UTC)[reply]
Never mind, that is the issue to be fixed :D — xaosflux Talk 18:12, 23 February 2019 (UTC)[reply]
 Donexaosflux Talk 18:13, 23 February 2019 (UTC)[reply]

Lua version[edit]

I switched the live template to use a new lua version. from my testing, "expandTemplates" output was identical for all the testcases, but this new version will allow us to leverage other lua features (like automatic retrieval of native image dimensions). please revert and let me know if anything blows up. Frietjes (talk) 22:43, 16 April 2019 (UTC)[reply]

I'm not sure if it's related or not, but the |align-cap= parm no longer works.--Auric talk 20:44, 17 April 2019 (UTC)[reply]
works for me in Újpest FC#Stadium (possibly fixed here). Frietjes (talk) 13:12, 20 April 2019 (UTC)[reply]
I have found a problem in case 8, the image is set as 500px, however the <div> tag is larger in 8 px, so I suggest to add an exception for this case. --Great Brightstar (talk) 13:51, 25 April 2019 (UTC)[reply]
that was a typo, fixed here (using noborder before it was defined). Frietjes (talk) 15:29, 25 April 2019 (UTC)[reply]
I made a bugfix at the sandbox page, which would add margin at the bottom of frame, affects case 7. -- Great Brightstar (talk) 15:39, 8 May 2019 (UTC)[reply]

No scrollbar on mobile browser (again)[edit]

I don't know what's causing the problem, but looking at this template right now on a mobile browser (eg. Amphibian#Frogs), it's not showing scrollbars on mobile. There's no visual indicator that the image there is either cropped or scrollable. --Lord Belbury (talk) 11:39, 28 January 2020 (UTC)[reply]

Lord Belbury, mobile devices don't have scrollbars, just scrollable surfaces. And we indeed have no indicator for that (there never has been). —TheDJ (talkcontribs) 12:10, 28 January 2020 (UTC)[reply]
Oh, okay. That seems bad, if it makes it a row of eight frog photos look like a row of five with nothing more to see. Could we put a CSS border around the image on mobile, to imply that it goes off the edge of the screen? --Lord Belbury (talk) 12:17, 28 January 2020 (UTC)[reply]
On Firefox for Android I can see the scrollbar, but it only appeared while you scrolling an image, and it's just a tiny notice on screen, unlike that of desktop browsers. --Great Brightstar (talk) 15:17, 22 July 2020 (UTC)[reply]

Was reminded of this after seeing another website (https://timeanddate.com/sun/uk/london) using a CSS border to convey that content was scrollable. It puts a thick dotted grey border down the right side of the scrollable content, which works well. Is there a way to have a border appear only on mobile? --Lord Belbury (talk) 09:57, 10 May 2020 (UTC)[reply]

Fix for the margin property[edit]

This template used margin: 0 auto property, however this has bad effects on page layout while I see Airbus#International manufacturing presence, which caused no gaps between the frames comparing to other frame of thumbnails. To fix this inconsistency, I suggest using new codes from Module:Wide image/sandbox. -- Great Brightstar (talk) 11:22, 21 July 2020 (UTC)[reply]

 Done (diff) Matt Fitzpatrick (talk) 04:28, 28 July 2020 (UTC)[reply]

Two problems[edit]

  1. 'cap-align' was changed to 'align-cap' here on line 117, but earlier up in the template, 'capalign', 'align', and 'text-align' are used instead. This is probably causing a problem, that was mentioned in Template_talk:Wide_image#Lua_version.
  2. The 'alt' text is not working. In Template:Wide_image/doc#Without_caption, the 'alt' text doesn't show up at all. In the Template:Wide_image/doc#With_caption example, the 'alt' doesn't show up, instead, what does show is a copy of the 'caption' "Helsinki panorama", but not was is listed after 'alt='.

If these issues could be fixed, that would be great. Funandtrvl (talk) 22:15, 23 November 2020 (UTC)[reply]

Pinging module author Frietjes in case she can help. Disabling request as code is not yet ready. — Martin (MSGJ · talk) 22:25, 23 November 2020 (UTC)[reply]
thanks, it's not working at Template:Panorama either, as these templates are linked. Funandtrvl (talk) 04:09, 24 November 2020 (UTC)[reply]
Funandtrvl (1) the p.main() function takes args['align-cap'] and passes it to the wideimage() as capalign. note that capalign is a variable used within wideimage() and is not the same as args['capalign'] which is not a supported input. unknown parameters are tracked in the currently empty Category:Pages using wide image with unknown parameters via this template frontend. if you want this template to support alternative syntax for this parameter, we can certainly do so. (2) it is useful to push the example through Special:ExpandTemplates to see what is happening. for
{{wide image|Helsinki z00.jpg|1800px||alt=Panorama of city with mixture of five to ten story buildings}} 
this expands to
<div class="thumb tnone" style="margin-left:auto;margin-right:auto;overflow:hidden;width:auto;max-width:1808px"><div class="thumbinner"><div class="noresize" style="overflow:auto">[[File:Helsinki z00.jpg|1800px|alt=Panorama of city with mixture of five to ten story buildings|]]</div></div></div> 
this appears to me to conform to Wikipedia:Extended image syntax#Alt text and caption. if you have a particular example that doesn't have the alt= in the image syntax, please let me know. Frietjes (talk) 20:00, 24 November 2020 (UTC)[reply]
@Frietjes: The problem is when you hover over the photos within the Wide image template, you should see a white box with the alt text within it. It is working for the Module:InfoboxImage, but not Module:Wide image. See 3 examples below, the first one is working, the second and third are not:

1. When you hover over the photo, a white box pops up and contains "The front stairs and door of Abbey Road Studios" {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|sizedefault=250px|alt=The front stairs and door of Abbey Road Studios}}

The front stairs and door of Abbey Road Studios

2. When you hover over the photo below, the alt text does not pop up in a white box. {{wide image|Helsinki z00.jpg|1800px||alt=Panorama of city with mixture of five to ten story buildings}}

Panorama of city with mixture of five to ten story buildings



3. In this example, the caption "Helsinki panorama" pops up in the white alt text box, but is should be the alt text of "Panorama of city with mixture of five to ten story buildings", instead. {{wide image|Helsinki z00.jpg|1800px|[[Helsinki]] panorama |alt=Panorama of city with mixture of five to ten story buildings}}

Panorama of city with mixture of five to ten story buildings
Helsinki panorama

The redirect Template:Großes Bild has been listed at redirects for discussion to determine whether its use and function meets the redirect guidelines. Readers of this page are welcome to comment on this redirect at Wikipedia:Redirects for discussion/Log/2023 March 10 § Template:Großes Bild until a consensus is reached. Aaron Liu (talk) 17:23, 10 March 2023 (UTC)[reply]

Relative sizing[edit]

Since sizing in pixels is deprecated, is there a way to size relative to the reader's prefs? Equivalent to "upright" in bracket formatting? — kwami (talk) 20:19, 22 January 2024 (UTC)[reply]