Before and After Image Slider Maker (Embeddable HTML)
Make an embeddable before and after image slider.
Use the tool
Why this tool exists
Choose the before image first and the after image second. The tool scales both to the same size and produces one block of HTML, CSS and a few lines of script, with the images embedded. The slider is a real range input laid over the pictures, so it works with a keyboard and screen readers.
The preview is static because scripts do not run in the preview frame. Paste the code in your page to see it work. For big pictures, host the files and swap the data URIs for their URLs.
How to use it
- Choose the before and after images, in that order.
- Write alt text for both.
- Pick a width and quality.
- Copy the code into your page.
Frequently asked questions
How big is the code?
It depends on the pictures. The size is shown. Embedded images make it large, so host them for big photos.
Does it need a library?
No. It is plain HTML, CSS and a few lines of JavaScript.
Do the images need the same size?
The second is stretched to match the first, so use pictures with the same aspect ratio.
Is anything uploaded?
No. The work happens in your browser and the page makes no network request with your input.