Explain what is being compared
Label both sides and describe the difference in text. A comparison graphic should help the reader see a specific change. Do not make the meaning depend on dragging a divider.
Provide a simpler alternative
A side-by-side pair can be easier to read than a slider on a small screen. Make controls keyboard-operable if you use them and avoid capturing normal page scrolling. Keep both image descriptions available.