Introducing Stiletto - the essential Shopify theme to fuel your ecommerce growth. Learn more.

Image compare

NEW

This section was added in v1.5.0 on Oct 27, 2022. See our change log and theme update guide to learn more.

The Image compare section shows a side-by-side comparison of 'before' and 'after' images with a slider to reveal them.

Image compare showing two dress styles

Set up section

Add this section to any template (except Checkout) and re-order its position. You can use this section multiple times on the same page with different content and settings.

Note: New sections will appear on all pages that use the same template. To add sections to specific pages only, learn how to create and assign multiple templates.

Steps

In your theme editor (Customize):

  1. Select a Template to edit from the dropdown menu in the top bar.

  2. In the side panel, click (+) Add section and select Image compare.

  3. Change the order of your sections by using the drag and drop handles ⋮⋮

Add before and after images

Upload an image to both the "Before" and "After" blocks. You can edit the Filter effects, Colors, and image Labels.

We recommend images with the same dimensions and similar composition to best reveal the differences between them.

Image block in theme editor
Image block in theme editor

Steps

In your theme editor (Customize):

  1. Click on the Before or After block to open the settings.

    Block settings
    Block settings
  2. Under Image, use the Select image button to add an image featuring multiple products.

    There are no required image dimensions but we recommend both images have the same dimensions.

    Images with a minimum width of 2048px will help ensure optimal quality across devices.

  3. Use Image focal points to specify the main focus of your images. The focal point of your image will remain centered and within frame when your site adapts to different screen sizes.

    See our image guide to learn more about specifying a focal point for an image used within a section or for an uploaded image file when used anywhere on your site.

  4. (Optional.) Select one of 7 Filter effects to apply to the image.

    Available filters: Blur, Brightness, Contrast, Grayscale, Invert, Saturate, Sepia.

    Use the Filter amount slider to increase or decrease the degree of the filter effect.

  5. Change the Overlay color and Overlay opacity using the slider to increase the contrast between the text and slide image.

    These settings help make your text clear and readable.

    Set the Opacity to 100% to create a solid color slide. This helps avoid images that include text in the image itself, which are not responsive or recommended.

  6. (Optional) Click the Overlay gradient option to add a color overlay that fades across a range of hues.

    You can choose the style, angle, position, and opacity of the gradient. See Shopify's color gradient guide to learn more.

  7. Enter Label text to display on the image.

    Select a Label position to move the label to a different part of the image.

    Uncheck Show label to hide the label.

  8. Under Color, use the color selectors to change the label Background and Text colors.

    We recommend using WebAIM's contrast checker when matching colors to make sure your text is clear and readable for everyone.

  9. Repeat steps 1 - 8 for both "Before" and "After" blocks.

    See the Section image styles to edit the position, shape, and Image reveal direction for both images.

  10. Click Save.

Edit image compare style

Click on the Image compare section to find settings for image Position, Aspect ratio (shape), and the Image reveal slider.

Image below headings with vertical reveal slider
Image below headings with vertical reveal slider

Steps

In your theme editor (Customize):

  1. Click on the Image compare section to open the settings.

    Image compare section settings
    Image compare section settings
  2. Choose an Image position to display the image reveal block to the Left, Right, or Below the section headings.

  3. Select the Image aspect ratio to crop your images to Square, Landscape, or Portrait.

    The Natural setting displays the original shape of your image.

    Example of aspect ratio shapes: Square, Landscape, and Portrait
    Example of aspect ratio shapes: Square, Landscape, and Portrait
  4. Choose to set the Image reveal direction to Horizontal or Vertical to let customers reveal the image from left to right or top to bottom.

  5. Use the Max width for image slider to limit the maximum width of the combined "Before" and "After" images.

  6. Use the Color selector to change the color of Reveal slider and Reveal slider arrows.

  7. Click Save.

Add section headings

Add a section Heading and Subheading. You can edit their Text alignment and the Heading size.

Section headings in theme editor
Section headings in theme editor

Steps

In your theme editor (Customize):

  1. Click on the Image compare section to open the settings.

  2. Enter Heading text to display a section title.

    We recommended one to three words.

    Set the Heading size to Small, Medium, or Large.

  3. Enter Subheading text to display beneath the heading.

    We recommend one to three short sentences.

    Use the formatting buttons to add bold, italic, or linked text.

  4. Click Save.

Add button

Add a Button block to link to your collections or products or any other page with a custom label.

Section button
Section button

Steps

In your theme editor (Customize):

  1. Click on the Image compare section to open the settings.

  2. Select or paste a URL for the Button link.

  3. Enter text for the Button label.

    The most effective button labels ask customers to do something (e.g. Get started, Join us, Shop now). To learn more, read "What is a Call to Action?"

  4. Select a Button style: either Solid, Outline, or Text.

    The button uses the theme-wide button color set in the Theme settings.

  5. Click Save.

Section style

Customize the section Style with options for section Animation, Top divider, and Padding.

Steps

  1. Click on the Image compare section and scroll down to the Section style settings.

    Section style settings
    Section style settings
  2. Choose to Enable animation to show visual effects when scrolling, hovering, or interacting with the section.

    Learn more about Section animations in Stiletto.

  3. Choose to display a Top divider that separates sections with a Solid line.

    The Top divider uses the color of Lines and borders set in the Theme settings.

  4. Select a Padding option to change the spacing between sections. Choose between Top and bottom, Top only, Bottom only, or set it to None.

  5. Click Save.

Contact

🇨🇦 Fluorescent Design Inc.

Send us a message
  • Toronto OfficeMonday to Friday, 10am to 6pm ET
  • Victoria (B.C.) OfficeMonday to Friday, 10am to 6pm PT
  • Average Response Time~1 Business Day
* Excludes statutory holidays. All offices closed to the public.