How to Add Before After Image Slider in WordPress

How to Add Before After Image Slider in WordPress

To add a before-and-after image slider in WordPress, you need a visual comparison tool that overlaps two images and provides an interactive, draggable handle. Using the ElementsKit Image Comparison widget for Elementor, you can easily showcase transformations, photo edits, or product results without writing any custom CSS or JavaScript.

Quick Solution: Before After Image Slider

✅ Activate Widget: Ir a ElementosKit > Widgets, Enciende el Comparación de imágenes widget, and click Save.
✅ Add to Page: Open Elementor, search for “Image Comparison,” and drag it onto your canvas.
✅ Upload Media: In the Content tab, upload your “Before” and “After” images.
✅Style Image Slider Container: Customize the container border, image, background, handle, etc.
✅ Publish: Update the page to make the slider live.

Also, watch in action ⬇️

How to Add Before After Image Slider in WordPress

Let’s go through step-by-step process of adding a before after image slider in WordPress: 

Step 1: Install & Activate ElementsKit Elementor Addon

Before building the slider, ensure the required tools are active on your site.

  • Instalar y activar el Kit de elementos plugin from your WordPress dashboard.
  • Navegar a ElementosKit > Widgets.
  • Localice el Comparación de imágenes widget in the list, toggle it to EN, and save your changes.

Step 2: Upload Before After Images for Comparison Slider

Open your desired page with Elementor, drag the Comparación de imágenes widget into a section, and establish your visual content.

How to Add Before After Image Slider in WordPress
  • Seleccionar estilo: Choose between a Horizontal (side-to-side) or Vertical (top-to-bottom) container style.
  • Upload Before Image: Click the image placeholder to select the original photo from your media library.
  • Add or Edit Before Image Label: Type the text for the “Before” tag (e.g., “Original,” “Old,” “Before”).
  • Upload After Image: Click the second image placeholder to select the transformed photo.
  • Add or Edit After Image Label: Type the text for the “After” tag (e.g., “Retouched,” “New,” “After”).

Step 3: Configure Before After Image Slider Functionality

Define how users will interact with the slider handle. Under the Contenido tab, expand the Ajustes section:

How to Add Before After Image Slider in WordPress
How to Add Before After Image Slider in WordPress
  • Set Offset: Use the slider to determine where the handle sits by default upon page load (e.g., set to 50% for dead center, or 70% to reveal more of the “Before” image initially).
  • Enable to Remove Overlay: Toggle this button to add or remove the dark overlay effect that appears before interaction.
  • Enable to Move Slide on Hover: Toggle this button EN if you want the slider handle to follow the user’s mouse automatically without requiring a click.
  • Enable to Move by Click: Toggle this button EN to allow users to instantly snap the slider to wherever they click on the image.

Step 4: Style Image Before After Image Slider Container

Cambiar a la Estilo tab to customize the aesthetics of your comparison tool to match your brand.

How to Add Before After Image Slider in WordPress
How to Add Before After Image Slider in WordPress

Under General Option:

  • Customize the container’s Tipo de borde, Radio del borde, Relleno, y Sombra de la caja to frame the images neatly.

Under Label Option: (Note: You can set different styling independently for both the “Before” and “After” labels.)

  • Adjust the label Color, Tipografía, Tipo de fondo, Margen, y Relleno to ensure the text is readable against your specific images.

Under Handle Option:

  • Control Width & Height: Size the draggable handle.
  • Background Type, Arrow Color, & Box Shadow: Customize these elements for both Normal y Flotar states.
  • Margin & Border Radius: Refine the shape of the handle (e.g., set a high border-radius for a circular handle).

Under Handle Divider Option:

How to Add Before After Image Slider in WordPress
How to Add Before After Image Slider in WordPress
  • Control the vertical line separating the two images by adjusting the Grosor del divisor y Color del divisor.

Step 5: Preview & Publish Before After Image Slider

Use Elementor’s Responsive Mode to check how the slider behaves on tablet and mobile devices. Once you are satisfied with the touch functionality and image alignment, click Actualizar o Publicar to push the changes live.

Preguntas frecuentes

Why Do Before And After Images Look Distorted or Stretched? 

For the slider to work perfectly, your “Before” and “After” images must have the exact same aspect ratio and dimensions. If one is a square and the other is a rectangle, the widget will force them to align, causing distortion. Always crop your images to the same size before uploading them to WordPress.

Does the Before and After Slider Work Fine on Mobile Touch Screens?  

Yes, the slider is fully responsive and touch-enabled by default. Users can tap and drag the handle using their fingers on smartphones and tablets.

Can I hide the “Before” and “After” text labels

Absolutely. If you prefer a cleaner look without text, simply delete the text from the Antes de la etiqueta de imagen y Etiqueta de imagen posterior fields in the Content tab. The labels will disappear entirely from the frontend.

How can I change the default starting position of the slider? 

Ve a la Ajustes dropdown in the Content tab and adjust the Compensar slider. Moving it to 30 will show 30% of the before image and 70% of the after image when the page initially loads.

Conclusión

Adding a before-and-after image slider to your WordPress site is one of the most compelling ways to visually prove your value and showcase real results. With the ElementsKit Image Comparison widget, you eliminate the need for custom coding and can build an interactive, mobile-responsive slider in minutes. 

By giving your visitors a hands-on way to explore your transformations, you instantly build trust and keep them engaged on your page longer.


Avatar de Moin

menos

Moin is an Elementor and Gutenberg specialist who partners with you to build professional, end-to-end WordPress sites that turn aesthetic design into conversion-driven results.

Comentarios

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *