Image Comparison Documentation
Everything DP Image Comparison can do, setting by setting.
How to add the module, what each style does, and a full reference of every setting in the Content and Design tabs.
Overview
Show the difference between two images with a draggable slider, a divider that follows the pointer, a fade, split labels or a reveal that plays as visitors scroll.
DP Image Comparison shows a Before and an After image in the same frame. Pick a look in Content > Comparison Style, then set the direction, the starting position, labels and the handle. Scroll Reveal uses Position As It Scrolls In and Position As It Scrolls Out to set where the divider starts and ends.
In the builder
Search for DP and choose DP Image Comparison. It works the same in Divi 5 and Divi 4.
5 styles
Pick one in Content > Comparison Style.
Single module
All the settings are on the module itself.
Adding it to a page
DP Image Comparison is part of DiviPerfect Modules. Once the plugin is active, the module is in the builder's module list.
Add the module
In the Divi builder, click the + button to add a module, search for DP and choose DP Image Comparison.
Add your content
Open the Content tab and fill in the module's own content settings. The module previews live in the builder as you type.
Pick a style
Choose a look in Content > Comparison Style.
Fine-tune the design
Use the Design tab for sizes, colours and fonts, and Advanced for CSS classes, custom CSS and visibility, like any Divi module. Empty colour settings use the style's own colours.
Styles
Choose a style in Comparison Style. See every style running live.
Classic Slider
Drag the handle to reveal more of either image.
Hover Follow
The divider follows the pointer, and can return when it leaves.
Fade
One image fades into the other.
Split Labels
The two halves are labelled and split cleanly.
Scroll Reveal
The divider moves as the comparison scrolls through the screen.
Features
DP Image Comparison shows two images in one frame with a divider between them, so visitors can compare a before and an after. Use it for renovations, retouching, product changes, design revisions or any change that is easier to see than to describe.
Five comparison styles
Classic Slider (drag the handle), Hover Follow (the divider follows the pointer), Fade (one image fades into the other), Split Labels (the labels ride on the divider) and Scroll Reveal (the divider moves as the page scrolls).
Side by side or stacked
Direction places the images left and right or top and bottom. Fade always works side by side, so it hides this setting.
Starting position
Starting Position sets where the divider sits when the page loads. 0% shows only the After image and 100% only the Before image.
Scroll-linked reveal
With Scroll Reveal, the divider moves from one position to another as the module scrolls through the screen. You set both ends with Position As It Scrolls In and Position As It Scrolls Out.
Before and After labels
Optional labels name each image. You can change their text and place them at the top, middle or bottom of the divider (left, middle or right when stacked).
Five handle styles
Circle, pill or square with arrows, a line with a grip, or a plain line. Handle, arrow and divider colours, divider width and handle size are all adjustable.
Fixed aspect ratio
Keep the shape of the After image, or crop both images to a set ratio such as 16:9, 1:1 or 3:4 so they always line up.
Keyboard and touch friendly
The divider can be moved with the arrow keys and with Home and End. On touch screens it is dragged, also in Hover Follow.
Reduced motion
Visitors who ask their device for reduced motion see the divider jump to its place instead of gliding.
How to use it
Step-by-step guides for the things people most often want to do with DP Image Comparison.
How to add your two images
- Open the module and go to Content > Images.
- Upload the Before Image. It shows on the left (or top).
- Upload the After Image. It shows on the right (or bottom).
- Fill in Before Image Alt Text and After Image Alt Text for screen readers.
- Leave an image empty while you set up the layout: the module shows a sample in its place.
How to pick and switch the comparison style
- Go to Content > Comparison > Comparison Style.
- Pick Classic Slider, Hover Follow, Fade, Split Labels or Scroll Reveal.
- The settings below change to match the style. For example, Return When The Pointer Leaves only shows for Hover Follow.
- Switch styles at any time. Your images, labels and colours stay the same.
How to set the starting position and direction
- Go to Content > Comparison > Direction and pick Side by side (left / right) or Stacked (top / bottom).
- Set Content > Comparison > Starting Position. 50% splits the frame in half.
- For Hover Follow, turn on Return When The Pointer Leaves to make the divider glide back to the starting position.
- Fade has no Direction setting, and Scroll Reveal uses its own scroll positions instead of Starting Position.
How to make the divider move as the page scrolls
- Set Content > Comparison > Comparison Style to Scroll Reveal.
- Set Position As It Scrolls In, for example 100% to start on the Before image.
- Set Position As It Scrolls Out, for example 0% to end on the After image.
- Save and scroll the live page to check the reveal.
How to show and edit the labels
- Go to Content > Labels and turn on Show Labels.
- Type the Before Label and After Label text.
- Pick a Label Position: Top / left, Middle or Bottom / right.
- Style the labels in Design > Labels (font, background, spacing, border).
- Split Labels always shows the labels, so Show Labels is hidden for that style.
How to change the handle and divider
- Go to Design > Divider & Handle > Handle Style and pick a handle.
- Set Handle Size and Divider Width.
- Pick a Handle Color, Arrow Color and Divider Color.
- Add a border or shadow to the handle in Design > Handle Border & Shadow.
How to change the colours
- Go to Design > Divider & Handle.
- Leave Handle Color empty to use the site accent colour (Divi's Primary/accent colour). Changing that Divi colour restyles every module that uses it.
- To change the colour on this module only, pick a colour in Handle Color, Arrow Color or Divider Color.
- Label colours are set in Design > Labels (text colour and background).
How to crop both images to the same shape
- Go to Design > Frame > Aspect Ratio.
- Pick From the After image to keep the After image's own shape.
- Or pick a fixed ratio such as Wide 16:9 or Square 1:1. Both images are cropped to fit.
- Set Design > Frame > Corner Radius to round the corners of the frame.
Tips
- Use two images with the same size and framing. Otherwise pick a fixed Aspect Ratio so both are cropped the same way.
- Hover Follow needs a mouse. On phones and tablets the divider is dragged instead.
- An empty Handle Color follows the site accent colour, so it changes when you change Divi's Primary/accent colour.
- In Divi 4 the same settings are in the same groups. The Labels group there offers background colour, margin, padding, width, max width, min height, height, border and box shadow.
Design Elements
The parts of DP Image Comparison you can style in the Design tab, and the options each part has. In Divi 4 the same groups have Background Color, Margin, Padding, Width, Max Width, Min Height, Height, Border and Box Shadow in the same toggle. Empty colour settings use the style's own colours, and text and accent colours follow your Divi theme colours.
Handle Border & Shadow
Design tab
The handle.
- Handle: Border (width, style, colour, rounded corners); Box Shadow.
Tip: A soft box shadow helps a light handle stand out on light images.
Labels
Design tab
The Before and After labels.
- Labels: Font (family, weight, style, size, colour, line height, letter spacing, alignment, text shadow); Background; Margin and Padding; Width, Max Width, Min Height and Height; Border (width, style, colour, rounded corners); Box Shadow.
Tip: A semi-transparent dark background keeps white label text readable on any photo.
Frame
Design tab
The image frame that holds both images.
Options: Aspect Ratio, Corner Radius
Tip: Use a fixed ratio when the two images are not exactly the same size, so they line up.
Divider & Handle
Design tab
The divider line and the handle you drag.
Options: Handle Style, Handle Color, Arrow Color, Divider Color, Divider Width, Handle Size
Tip: On busy photos, a wider divider and a larger handle are easier to see and to grab on phones.
Settings Reference
Every setting DP Image Comparison adds, in the order you find it in the builder. Divi's standard Design options (fonts, spacing, borders, box shadow, filters, transforms, animation) and the Advanced tab work as they do on any Divi module.
Images
Content tab
- Before Image: Shown on the left (or top). Empty uses a sample. Image.
- Before Image Alt Text: Text.
- After Image: Shown on the right (or bottom). Empty uses a sample. Image.
- After Image Alt Text: Text.
Comparison
Content tab
- Comparison Style: Classic Slider: drag the handle. Hover Follow: the divider follows the pointer. Fade: one image fades into the other. Split Labels: the labels ride on the divider. Scroll Reveal: the divider moves as the page scrolls. Options: Classic Slider, Hover Follow, Fade, Split Labels, Scroll Reveal. Default: Classic Slider.
- Direction: Options: Side by side (left / right), Stacked (top / bottom). Default: Side by side (left / right).
- Starting Position: Where the divider starts. 0% shows only the After image, 100% only the Before image. Range: 0 to 100 %. Default: 50%.
- Return When The Pointer Leaves: The divider glides back to the starting position. On or off. Default: on.
- Position As It Scrolls In: Range: 0 to 100 %. Default: 85%.
- Position As It Scrolls Out: Range: 0 to 100 %. Default: 15%.
Labels
Content tab
- Show Labels: On or off. Default: on.
- Before Label: Text.
- After Label: Text.
- Label Position: Where the labels sit along the divider (top, middle or bottom of the image; left, middle or right when stacked). Options: Top / left, Middle, Bottom / right. Default: Top / left.
Frame
Design tab
- Aspect Ratio: From the After image keeps its shape; the others crop both images to fit. Options: From the After image, Wide 16:9, Landscape 3:2, Landscape 4:3, Square 1:1, Portrait 3:4, Portrait 2:3. Default: From the After image.
- Corner Radius: Range: 0 to 200 px. Default: 16px.
Divider & Handle
Design tab
- Handle Style: Options: Circle with arrows, Pill with arrows, Square with arrows, Line with grip, Line only. Default: Circle with arrows.
- Handle Color: Empty uses the site accent color. Color.
- Arrow Color: Color. Default: #ffffff.
- Divider Color: Color. Default: #ffffff.
- Divider Width: Range: 0 to 12 px. Default: 2px.
- Handle Size: Range: 24 to 96 px. Default: 48px.
Support
Something not working as expected, or a question this page does not answer? Get in touch and we will help you get Image Comparison working on your site.

Frequently Asked Questions
Common questions about DP Image Comparison.
Can the divider go top to bottom?
Yes. Set Direction to vertical to compare the images top to bottom.
Can I change the labels?
Yes. Write your own Before Label and After Label, choose their position, or turn labels off.
Does it work on touch screens?
Yes. Visitors can drag the handle with a finger.
Does it work with Divi 5 and Divi 4?
Yes. The module has the same settings and styles in both builders.
Can I use it more than once on a page?
Yes. Each copy of the module has its own settings.









