JavaScript Photo Viewer

Photo Viewer is a free JavaScript tool for the quick creation and simple maintenance of feature-rich, web-based photo galleries. With Photo Viewer you can...

  • Create and maintain one page for an entire album instead of one for each picture.
  • Embed photos in virtually any web page design.
  • Captions can include HTML formatting.
  • Captions can be displayed as image alt tags.
  • Easily create and maintain your photo inventory.
  • Include next, previous, and jump-to-photo capabilities anywhere on your page.
  • Create navigation controls with any combination of text and graphics.
  • Include a numbered index of photos for easy navigation.
  • Speed download times with automatic photo pre-caching.
  • Allow people to share links to specific photos as well as the whole album.

Photo Viewer does not require cookies, server-side processing, or frames.

Photo Viewer is free to use so long as you provide proper attribution and a discrete link from your site to this page.

Download current version
2.30 (Includes documentation and examples)

If you have an older version of Photo Viewer, here are the changes for the various versions:

  • Version 2.30 Added optional index parameter
  • Version 2.22 Fixed click photo to advance and ALT text
  • Version 2.21 Moved precaching image to bottom of page (IMPORTANT: read this if upgrading from an earlier version.)
  • Version 2.20 Added showFirst, showLast, click photo to advance, caption as photo ALT text
  • Version 2.13 Added slideshow features
  • Version 2.12 Parameterized ID's, wrapping optional
  • Version 2.11 Added caching of next image
  • Version 2.10 Added index functionality
  • Version 2.00 Functional browsing of images forward and back

Have a comment or feature request? Please let us know.

Help Us, Get Credit

We would like your help in making JavaScript Photo Viewer even better. If you have added a feature, let us know. If we like it and add it, you'll get credit. If you're itching to show of your JavaScript coding skills and don't have a particular idea, here are some things that we'd like to work on:

  • Example templates that show off design flair.
  • Make the code object-oriented.
  • Auto zoom - When a picture is loaded, automatically resize it so that doesn't exceed a preset height or width.
  • Photolist.js editor so that anyone can create/edit photolist.js without having to edit JavaScript source code.

Got an idea? Share it now.

We're looking for more examples of Photo Viewer in action. If you'd like to share your site / album design, please let us know.

If you like this tool, please consider linking to us or rate it at