iOS Safari has a bug that freezes GIF images that are shifted outside of the window (or outside of element with overflow:hidden
). My recommendatiuon is to avoid using animated GIFs in PhotoSwipe at all, as they slow down animation performance in any mobile browser. But if you really need to use it, refer to this hack.
In most of cases, it can happen in iPhone or in old Android phones (before KitKat) with low memory limit. The #1 reason of crash is too big images (usually >2000px), avoid images larger than 1200px for an average 800x600 phone. Crash can also occur if you open PhotoSwipe during some process on your page (this can be initial page load/render, or some complex animation on page), try to delay PhotoSwipe initialization until page is rendered (18-300ms after document.ready), especially if you're opening large images.
Plugin is under development and will be released in early-mid 2015. You may subscribe here to get notified.
Use another gallery script (1, 2), or find a way:
Dimensions are used for progressive loading, stretched placeholder, initial zoom-in transition, paning, zooming, caption positioning.
Know how this page can be improved? Suggest an edit!
</> with <3 in by @dimsemenov