Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. JavaScript
  3. PhotoSwipe

PhotoSwipe

MITJavaScriptv5.4.4

A modular, framework-independent JavaScript image gallery and lightbox for mobile and desktop.

Visit WebsiteGitHubGitHub
25.1k stars3.3k forks0 contributors

What is PhotoSwipe?

PhotoSwipe is a JavaScript image gallery and lightbox library that provides a smooth, native-like experience for viewing images on both mobile and desktop devices. It solves the problem of creating performant, accessible image galleries with features like zoom, pan, and swipe gestures without requiring a specific framework. The library is modular and framework-independent, making it easy to integrate into any web project.

Target Audience

Web developers and designers who need a lightweight, customizable image gallery or lightbox solution that works across all devices and frameworks.

Value Proposition

Developers choose PhotoSwipe for its mobile-first design, framework independence, and modular architecture, which allow for easy integration and customization without bloat or dependencies.

Overview

JavaScript image gallery for mobile and desktop, modular, framework independent

Use Cases

Best For

  • Adding touch-friendly image galleries to mobile websites
  • Creating custom lightboxes without framework dependencies
  • Building image-heavy portfolios or media sites
  • Implementing zoom and pan functionality for high-resolution images
  • Ensuring accessibility in image viewing interfaces
  • Integrating galleries into static sites or vanilla JS projects

Not Ideal For

  • Projects deeply integrated with React or Vue that need seamless component libraries
  • Websites requiring video lightboxes or non-image media support
  • Teams seeking out-of-the-box styled galleries without custom CSS work
  • Applications prioritizing long-term stability over upcoming feature updates

Pros & Cons

Pros

Mobile-First Design

Optimized for touch interactions with smooth gestures and responsive behavior, making it ideal for mobile websites as demonstrated in the demo.

Framework Independence

Works with any JavaScript framework or vanilla JS, with no dependencies, allowing flexible integration into various projects without lock-in.

Modular Architecture

Core and Lightbox modules can be used separately, providing flexibility to choose only what's needed, as outlined in the README structure.

Accessibility Support

Built with keyboard navigation and screen reader support, ensuring the gallery is usable for all users, a key feature highlighted in the documentation.

High-Resolution Image Handling

Supports smooth zoom and pan for high-resolution images, enhancing the viewing experience for detailed media on both mobile and desktop.

Cons

Upcoming Version Changes

With v6 in development, users may face breaking changes and need to plan for migration, as indicated in the README's feedback request, adding uncertainty.

Manual Configuration Required

Requires building from source or handling dist files, which can be more complex than drop-in solutions with auto-setup, lacking a simple CDN or npm quickstart.

Lack of Pre-Built Themes

While customizable, it doesn't offer pre-styled options, forcing developers to write custom CSS for design integration, increasing initial setup time.

Limited Third-Party Extensions

Has a smaller ecosystem compared to more popular libraries, with fewer community plugins or integrations, which can limit advanced functionality.

Frequently Asked Questions

Quick Stats

Stars25,129
Forks3,281
Contributors0
Open Issues158
Last commit4 months ago
CreatedSince 2011

Tags

#vanilla-js#lightbox#image-viewer#accessibility#touch-gestures#javascript#mobile-first#image#responsive-design#gallery

Built With

J
JavaScript
C
CSS
R
Rollup

Links & Resources

Website

Included in

JavaScript34.9k
Auto-fetched 1 day ago

Related Projects

reveal.jsreveal.js

The HTML Presentation Framework

Stars71,055
Forks16,808
Last commit4 days ago
SwiperSwiper

Most modern mobile touch slider with hardware accelerated transitions

Stars41,833
Forks9,683
Last commit6 days ago
impress.jsimpress.js

It's a presentation framework based on the power of CSS3 transforms and transitions in modern browsers and inspired by the idea behind prezi.com.

Stars38,226
Forks6,611
Last commit2 months ago
Embla CarouselEmbla Carousel

A lightweight carousel library with fluid motion and great swipe precision.

Stars8,188
Forks252
Last commit1 day ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub