A before-and-after slider helps customers compare two versions of the same subject. It works best for a consistent viewpoint, such as a treatment result, restoration or design change. Two unrelated images rarely produce a useful comparison.
Prepare matching images
Use the same dimensions, crop, angle and lighting wherever possible. Compress the files and reserve their display area to avoid layout movement. Add clear Before and After labels so the meaning does not depend on which side is visible.
Start with a comparison section already supported by your Shopify theme. The older TwentyTwenty jQuery implementation is one possible legacy approach, but adding that dependency solely for one slider is often unnecessary.
Build the interaction deliberately
A custom implementation can layer the two images and use a labeled range input to control the reveal position. Keep the handle large enough for touch, support keyboard adjustment and scope the component so several comparisons can exist on one page.
Use the input value to update only the comparison component. Do not bind a global drag handler that interferes with scrolling, product galleries or other page controls.
Provide a useful fallback
If JavaScript fails, show both images or a clearly labeled static comparison. Essential claims should remain in readable text. Do not rely on dragging alone to communicate a result, and do not make the component the only location of important product information.
Test a small phone screen, keyboard operation, browser zoom and several sliders on one page. Check that the customer can scroll past the component comfortably. In Shopify's theme editor, initialize a reloaded section once and release its event handlers when it is removed.
References
Put this into practice.
Minion builds Shopify comparison sections and product storytelling tools that fit your theme and remain easy for the merchandising team to update.