WP ImageViewer


ImageViewer is an image viewer inspired by Google Photo’s.
It may also look familiar to users of Ebay.com or Tweakers.net.

It provides a modal for images, similar to modals as lightbox, colorbox and fancybox, just in a somewhat more abstract way.


  • Smooth dragging and panning images.
  • Support touch devices.
  • Double tap to zoom in/zoom out.
  • Pinch in / pinch out to zoom in/out.
  • Snap view for easier panning and zooming experience.
  • Exposed API to control zoom programmatically.


  • Clean user interface, no bells, no whistles, no horns.
  • Lightweight code (no PHP, 2 JS files and 1 CSS file).
  • No settings page (really).
  • No database queries.

Upstream Project

You can look at Github for the original code.
This project is integrated in this WordPress plugin and all ready to use.


This plugin is compatible with ClassicPress.


This plugin is also available in Codeberg.



  • Install the plugin through the admin page “Plugins”.
  • Alternatively, unpack and upload the contents of the zipfile to your ‘/wp-content/plugins/’ directory.
  • Activate the plugin through the ‘Plugins’ menu in WordPress.
  • That’s it.

It should just work on the standard WordPress gallery and images.


I have an image, but when I click nothing happens

This plugin expects the same html layout as lightbox, colorbox and fancybox. The image/thumbnail should be inside a link, an a element.
That link should point to the main media image, not the attachment page or a custom link. Only when the link points to an image file, it will show the viewer,

I am using Nextgen Gallery

You can go to Gallery > Other Options > Lightbox Effect-tab and select None for the Lightbox Effect.

I would like to use custom options for the viewer

This code should help you, you can change these default values and put this PHP code in the functions.php file of your theme (preferably a child theme).

function imageviewer_custom_options() {
    imageviewer_custom_options = {
        zoomValue: 100,
        snapView: true,
        maxZoom: 500,
        refreshOnResize: true,
        zoomOnMouseWheel: true
add_action( 'wp_footer', 'imageviewer_custom_options' );


July 18, 2021
Dead simple, super light weight and speedy. Pages load faster than other lightbox plugins. Love the addition of navigating via arrow keys and works beautifully on my touch screen monitor. Visually fantastic!
July 3, 2019
This plugin works great with NextGen Gallery! Had tried several other lightboxes, zoom plugins, etc. but none would serve my purpose. I have several images of 8 1/2" x 11" pages of text that were too small to read in their native format/size. I wanted to be able to enlarge them, but none of the other half dozen plugins I tried would do anything other that making the image "full screen" which didn't to it. WP ImageViewer let's me enlarge the page as much as necessary so users can view the page at a readable size and scroll through it. Exactly what was needed! I'd encourage others to use this plugin too and help it build a following to encourage the developer(s) to keep support up to date! To Marcel Pol: Thanks very much for this very useful plugin!
Read all 7 reviews

Contributors & Developers

“WP ImageViewer” is open source software. The following people have contributed to this plugin.


Translate “WP ImageViewer” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.



  • 2022-10-28
  • Add callback for after showing an image.


  • 2021-08-12
  • Add possibility to use custom options for the viewer.


  • 2021-02-22
  • Fix deprecated jQuery calls with WP 5.6 and jQuery 3.5.


  • 2020-11-03
  • Support images which have extra ?get parameters.


  • 2020-10-19
  • Do not slide on touch when zoomed in.


  • 2020-02-21
  • Fix check for active viewer.


  • 2020-02-18
  • Update to upstream 2.0.0 iv-viewer.
  • Add navigation with arrow keys.
  • Only add hide-event to ‘body’ once, not for every image.
  • Only run expensive code when viewer is active.


  • 2019-07-12
  • Support Enter and Esc key to open or close viewer.


  • 2019-04-16
  • Do not swipe on multitouch.


  • 2019-03-29
  • Add z-index to close button.


  • 2019-03-11
  • Support touch events for swiping.


  • 2019-01-03
  • Slightly bigger navigation buttons again, should be less sticky.


  • 2018-12-01
  • Slightly bigger navigation buttons.
  • Add z-index to navigation.


  • 2018-11-30
  • Initial release.