Images play an essential role on the web and in any digital presence. Automad provides responsive images, image galleries, and slideshows as blocks that can be added to any block editor field. These blocks make it easy to display individual images with custom focal points and responsive aspect ratios, as well as manage and present image collections in versatile ways — from structured galleries to responsive slideshows.
Responsive Images
Automad lets you control how images are displayed across different device sizes by defining aspect ratio breakpoints and also lets you define what part of an image is relevant and should be focused when being cropped. Both are configured in the Aspect and Focus settings of an Image block.
Aspect Ratios
As shown in the image above, you can define distinct aspect ratios for a max-width breakpoint in the format max-width:width/height. For example, 700:4/3 would show the image in 4/3 format when the containing element has a width less than 700px. Multiple breakpoints can be separated by whitespace. The Aspect Ratio Presets let you quickly add common breakpoints such as 500:2/3, 700:1/1 or 900:4/3.
Focal Point
When cropping images using aspect ratio breakpoints, the interesting part of an image might get cut off. Automad lets you set a focal point for an image. The area around that point will then always be visible by positioning the image accordingly. Note that the focal point only has an effect when the image is cropped, so at least one aspect ratio breakpoint has to be defined.
The first image shows the focal point location marked by ⊕ in the original image. The second image demonstrates how the image is cropped and positioned based on that focal point.
Galleries
Galleries let you showcase multiple images at once. Clicking an image opens it in a lightbox for easy viewing. To add a gallery, click the little + icon in the block editor and search for the Image Gallery block. Automad supports three layouts, which can be selected in the Layout setting and all handle images of different dimensions gracefully. The following settings let you fine-tune a gallery:
- Gap (Pixel) — the space between images,
5by default. - Column Width (Pixel) — the target width of the columns in the column and grid layouts,
250by default. - Row Height (Pixel) — the target height of the rows in the row and grid layouts,
250by default. - Fill rectangle — adjusts the images so that the gallery forms a closed rectangle without uneven column ends or an incomplete last row.
Column Layout
Images are arranged in a masonry-style column layout, automatically adjusting the number of columns based on available space. Ideal for collections with varying image sizes.
Row Layout
Images are displayed in continuous horizontal rows, automatically adapting to images of different heights and widths. Works well for flowing presentations of diverse images.
Grid Layout
A clean, uniform grid where each image is centered within its cell. Works well for structured, evenly spaced presentations, even when images have different dimensions.
Slideshows
Slideshows display images in a rotating sequence, perfect for highlights or featured visuals. To add a slideshow, click the little + icon in the block editor and search for the Image Slideshow block. The Settings of a slideshow offer the following options:
- Effect — the transition between slides, either slide, fade or flip.
- Continuous looping, which is enabled by default, and Autoplay mode.
- Playback speed (ms) — the time each slide is shown in autoplay mode,
3000by default. - Hide controls — hides the navigation controls.
- Image width (Pixel) and Image height (Pixel) — the size all images are cropped to,
1200×780by default. - Images per view and Space between images in pixels.
Responsive Slides
Slideshows are fully responsive and can show more images per view in wider blocks. Use the Number of images based on block size field to define breakpoints as pairs of a minimum block width in pixels and a number of images, separated by a colon. Multiple breakpoints are separated by whitespace. For example, the default value 600:2 900:3 shows two images when the block is at least 600px wide and three images from 900px on.
Captions
Captions for an image can be defined in the Files tab of a page or in the Global Data and Files section. To edit a caption, open the file card menu using the dropdown in the lower-left corner and select Edit file info.
Captions support Markdown formatting and are displayed automatically in gallery lightboxes and slideshows. Note that the Image block doesn't use these captions. Instead, it has its own caption field right below the image.