Galleries

Offline MediaWiki Code Editor

Galleries
Previous Top Next

For the display of single images see: Images
graphic
Menu of galleries

A gallery is a series of images displayed horizontally, vertically or in a patchwork. Some assistants impose limitations to the number of images it can contain, making necessary to insert more galleries, one after another, to include all images.

There are four assistants in the application based on different techniques
·    Assistant 1:Galleries based on wikitables    
·    Assistant 4 Horizontal galleries


What assistant should you use?
Assistants
1
2
3
4
Intended layout
of your gallery
Galleries based on tables
Galleries based on the HTML <gallery> tag
Vertical galleries and image patchworks
Horizontal galleries
Display images arranged horizontally 

Yes

Yes

No

Yes
Display images arranged vertically
No
No
Yes
No
Display large images saving page space
No
Yes
No
No
Display an image array in patchwork
No
No
Yes
No
In case of enough accompanying text

In case there is enough accompanying text, vertical galleries are always preferable, because their appearance is not affected by the width of the browser window. Horizontal galleries do not always adapt to the window width. Only those based on the HTML tag do.
Galleries built with the assistants #1 and #4 have fixed widths and do not adapt automatically to the window width.

In case of few accompanying text

In case there is few accompanying text, horizontal galleries are preferable to fill the page space avoiding large blank space. If besides the images have a relatively large size, you might want to consider using the "slideshow" method of the assistant #2.


In case the images have different aspect ratio

In case the images of an horizontal gallery have different aspect ratios, you might want to adjust each image size to display all images with the same height, giving a more uniform aspect. This adjustment can be performed using the "compact" method of the assistant #2. This is the recommended method. The same result can also be performed with the assistant #4, but in this case it is required to enter not only the width, but also the height of the images so the assistant can calculate the aspect ratio.


If you want to customize the gallery

Both galleries build with the assistants #3 and #4 can be customized. These have options to add a header, a footer, or to modify background color.


Horizontal galleries

You can display an horizontal arrangement of images using any of the assistants, except #3 which was designed for vertical galleries only. If you want to display up to four images, not exceeding the usual page width, you may use the assistant based on tables (#1). This assistant behaves especially well with images that have a similar relation of aspect. For up to ten images you may use the assistant #4. But for an indefinite number of images, use the assistant based on the <gallery> tag (#2) which automatically adjusts the number of rows according to page size. Be aware that some mobile devices may display galleries vertically when the total width is greater than 320 px. Assistants #3 and #4 offers options to customize background color.


Vertical galleries

You can display a vertical arrangement of up to ten images using the assistant #3. Fixing the total-width of the gallery you can give the same width to all images. The galleries are aligned to the right by default but you can change the alignment in the assistant. This assistant also offers options to customize background color.


Slideshows

Slideshows are a resource to display a gallery of large images saving space. It consists of a frame showing the first image of the gallery, with buttons to shift images one after other. The assistant based on the gallery tag (#3) allows to build "slideshows". The maximum recommended width for a slideshow is 350 px.


Image patchworks

With the assistant for Vertical galleries and image arrays (#3) you can also combine up to ten images in a patchwork. The assistant offers two options for arrays:
·    Equal number of images per row
·    Unequal number of images per row

If you combine ten images and choose two images per row the assistant will generate code for five rows.  If you choose an unequal number of images per row, the assistant can generate code for a maximum of four rows. The position in the gallery depends on the order of declaration of the images. Take it into account to enter the images in the right order to obtain the desired results. The dimensions of the images are automatically adjusted, so images can match without blank spaces. A good practice is to organize the images according to their relation of aspect.