Zoomable Image

I’m trying to create a media viewer lightbox using IonModal and IonSlides, however when placing an image in a slide, it is not naturally zoomable (pinch-to-zoom). There are a number of really old posts that mention placing the image in a component called IonScroll, which has a “zoom” prop, but that doesn’t seem to exist anymore, or at least not in the React version.

Is there a current or updated approach to this problem?

Have you tried using the zoom option on IonSlides?

<IonSlides options={{
  zoom: true
}} />

See https://www.tutorialdocs.com/tutorial/swiper/api-zoom.html


Thanks, Max. This does look like it should do exactly what I want it to, but it looks like I have monkeyed around with the base CSS too much for it to work with what I’ve got at the moment. This absolutely points me in the right direction though, thanks!!

1 Like