The CAES Before-After Slider lets you stack two images and compare them with a divider that visitors can drag. As they slide the divider left and right, one image is revealed and the other is hidden. It works well for showing change over time or comparing a treatment to a control.
Table of Contents
1. Add the block and choose your images
- Add a new block and search for “Before-After Slider”. You will find it in the Media category.
- In the Before Image slot, click Select Image. This image shows on the left of the divider.
- In the After Image slot, click Select Image. This image shows on the right.
- Fill in the Alt Text field under each image to describe it for screen reader users.


Tip
Use two photos shot from the same angle and distance. The comparison lines up best when both images match.
2. Preview the slider
Previewing lets you test the slider the way a visitor will use it, before you publish.
- With both images set, click Preview (the eye icon) in the block toolbar.
- The block turns into a working slider. Drag the handle to test the comparison.
- Click Edit (the pencil icon) to go back to swapping images.
3. Set the frame shape
Both images sit inside one shared frame, so the block needs to know what shape that frame should be. Open the Display panel in the sidebar and set Frame shape:
- Match the After image (default). The After image shows in full, and the Before image is cropped to fit.
- Match the Before image. This does the opposite. The Before image shows in full, and the After image is cropped to fit.
- A fixed ratio (16:9 Widescreen, 4:3 Classic, 3:2 DSLR Photo, 1:1 Square, 2:3 Portrait). Both images are cropped to that shape.
Note that whenever an image gets cropped, a Set Focus Point button appears for it. See the next step.
4. Set the focus point on cropped images
The focus point tells the block which part of a cropped image to keep in view, so the important part does not get cut off.
- Click the Set Focus Point button on a cropped image.
- Drag the marker over the most important part of the photo, such as a face or a building.
- The block keeps that spot in view as it crops.
5. Adjust the slider options
Open the Slider panel in the sidebar:
- Starting divider position (%). This sets where the divider sits when the page first loads, from 5 to 95. A lower number shows more of the After image. A higher number shows more of the Before image.
- Figure caption (optional). This text shows below the slider.
6. Add labels
Labels are small tags that sit on top of each image, so visitors can tell at a glance which side is which. Open the Labels panel to add them:
- Turn on Show Before / After labels.
- Edit the Before label and After label text. The defaults are “Before” and “After”.
The labels sit on top of each image and move with the divider.

7. Accessibility
These settings make sure screen reader users get the same information sighted visitors do. Open the Accessibility panel:
- Slider accessible name (aria-label). This is read aloud to screen reader users when they focus the divider handle. Make it meaningful, like “Before and after of the renovated garden”.
- Mark images as decorative. Turn this on only when the text around the slider or the caption already describes the comparison in full. It sets empty alt text on both images and hides the per-image Alt Text fields.
Quick checklist
- Both Before and After images are selected
- Alt text is written, or the images are marked decorative
- Frame shape is chosen, and focus points are set for any cropped image
- You previewed the live slider
- Labels and a caption are added if you want them
- The accessible name is filled in
See it in action
Here is a finished slider. It compares the outside and inside of early-maturing satsuma varieties grown in southern Georgia, with ‘Owari’ in the center for reference. Drag the divider to move between the peel color and the cut fruit. The photos come from the UGA Extension publication Comparing Early-Maturing Satsumas to ‘Owari’ in Southern Georgia.







