Skip to content

Switch to PhotoSwipe for the slideshow #158

@oparoz

Description

@oparoz

It was suggested that PhotoSwipe could be a replacement, so I took a look at the API and did a rough implementation.

Here are my findings:

+

It supports quite a few features which were manually added to the Gallery slideshow and solves some of the complaints mentioned above

  • Supports keyboard shortcuts
  • Mobile optimised
  • Auto PNG/SVG selector for buttons
  • Fullscreen support
  • Auto-control hide
  • Social sharing. Our custom oC sharing could be added to the list...one day
  • Customisable image pre-loading
  • Supports captions (we only have the filename, that's better than nothing)

-

The initialisation doesn't work out of the box because we don't have the image dimensions before launching the slideshow

  • We have to add our own spinner/loader because we don't know the size of images
  • We need to theme it to match ownCloud's design identity
  • Scroll to zoom doesn't work out of the box on desktop. So it's zoom in and zoom back out, like in the browser vs like in Google Maps unless we implement a fix
  • Zooming only works well if we're able to send multiple dimensions categories to the slideshow. This would solve other problems with thumbnails of various sizes accumulating in the cache, but that means extra work
  • Zooming is also only possible if we download the whole image and resize it in the browser, leading to a lot of bandwidth waste
  • No image luminance detection, so we'll still have to take care of that
  • No broken image detection (404 or 500), so we'll still have to take care of that

My biggest problem is with the missing scroll to zoom feature on the desktop, but if it's not on/off with gestures, it should be possible to get it to work on desktops as well.

Sponsorship

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions