Template talk:Multiple image

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia


Two images vertically with different widths[edit]

How to center two image with different widths that are positioned vertically to each other? It's not enough with align parameter for now. Natsuikomin (talk) 08:55, 10 January 2024 (UTC)[reply]

A donkey
Rectangular image of a donkey, originally 536 pixels high.
A trout
Square image of a trout, originally 300 pixels high.
Both images have been rendered with the same height, and a total width of 220px. The whole thing is centred
@Natsuikomin: Use |align=center, as above. --Redrose64 🌹 (talk) 21:31, 10 January 2024 (UTC)[reply]
Both are clearly positioned horizontally. You can see what my problem is here. Natsuikomin (talk) 22:02, 10 January 2024 (UTC)[reply]
Just remove the two "width" parameters. Moxy- 05:01, 11 January 2024 (UTC)[reply]
And I just would make both have the same widths. All I want is both have different widths, but are vertically centered. Natsuikomin (talk) 11:25, 11 January 2024 (UTC)[reply]
Anyone can help? Please remember, vertically with different widths, not either vertically with the same width or centered horizontally. Thanks. Natsuikomin (talk) 11:39, 21 January 2024 (UTC)[reply]
@Natsuikomin: You can stack two galleries with different widths inside an image frame:
A donkey
Rectangular image of a donkey, originally 536 pixels high.
A trout
Square image of a trout, originally 300 pixels high.
Both images have been rendered with the same height, and a total width of 220px. The whole thing is centred

Jarble (talk) 18:43, 31 January 2024 (UTC)[reply]

Sorry for accidentally deleting a few messages. self-trout. DMacks (talk) 19:24, 31 January 2024 (UTC)[reply]

Cropping images[edit]

@Frietjes: I wish we had an option to include cropped images in groups of multiple images. Could this feature be implemented using {{CSS image crop}}? Jarble (talk) 17:54, 23 January 2024 (UTC)[reply]

probably possible, but a lot more code. will see if anyone else has an opinions. Frietjes (talk) 21:48, 23 January 2024 (UTC)[reply]

Does this template not support more than 10 images?[edit]

@Frietjes: According to its documentation, this template allows a maximum of 10 images. Isn't it possible to include more than 10 images in this template, as shown here?

Structural templates used in compounds, with red marking possible positions for radicals

Jarble (talk) 21:34, 30 January 2024 (UTC)[reply]

Jarble, seems like you answered your own question? Frietjes (talk) 15:32, 31 January 2024 (UTC)[reply]

Removing the image gap[edit]

@Frietjes: I tried to display these images with a gap of only one pixel, but the gap is much larger:

Is it possible to remove the gap between these images? Jarble (talk) 18:03, 1 February 2024 (UTC)[reply]

Jarble, probably not because Template:Multiple image/styles.css specifies a 1px margin, you can only increase the gap, but a css expert would know more. by the way, the default value for |image_gap= is 1, so setting it to 1 does nothing. Frietjes (talk) 18:14, 1 February 2024 (UTC)[reply]
I suspect there might be a small issue due to the new HTML structure of images that core generates. The border of images has changed a bit, and I think this template has an off by 1 pixel error because of it. Might look at it this weekend. —TheDJ (talkcontribs) 08:53, 8 February 2024 (UTC)[reply]

standard width?[edit]

This template only seems to support widths in px, which is deprecated. Can it scale relative to user default? — kwami (talk) 03:41, 8 February 2024 (UTC)[reply]

Widths in px are not deprecated. That's just a weird thing that FA people decided ;) —TheDJ (talkcontribs) 08:40, 8 February 2024 (UTC)[reply]
They do override user preferences. For those of us who wish to allow readers to adjust the display of articles so that they can read them (if they have poor vision or hi-res monitors), is there a way to do that with this template? — kwami (talk) 08:43, 8 February 2024 (UTC)[reply]
No. not right now. Templates do not have access to the value of the user preferences, and with all the calculations this template does, it will probably not be easy to create the needed scale derived factors and keep the same results. This is one of the known documented downsides of building templates that emulate the core thumbnails. —TheDJ (talkcontribs) 08:45, 8 February 2024 (UTC)[reply]
Okay, thanks. — kwami (talk) 08:47, 8 February 2024 (UTC)[reply]

Aligning images towards the top or the bottom?[edit]

Let's say I have two coats of arms that have the same width (shield size), but one has a crown on top. Can I align the images toward the bottom so that the shields themselves both appear to be the same size, but one has a crown on top 'undisturbed'? I have already set the image width. Worldlydev (talk) 10:12, 26 March 2024 (UTC)[reply]