A Lightweight JavaScript Image Viewing Plugin With Smooth Animations

Img-previewer is a small, easy-to-use JavaScript image preview plugin, ready for use out of the box, with no additional configuration required. Suitable for any web page, no need to change the page’s HTML code structure.

lightbox gallery bootstrap, jquery image viewer, responsive lightbox jquery, jquery lightbox video popup

Provides commonly used functions:

  • Mouse wheel to enlarge the image
  • Image dragging icon
  • Smooth animation transition
  • Previous Next

How to make use of it:

1. Load the img-previewer’s JavaScript and CSS within the HTML doc.

<link rel="stylesheet" href="./src/index.css" />
<script src="./dist/img-previewer.min.js"></script>

2. Initialize the img-previewer and we’re executed.

const myViewer = new ImgPreviewer('#image-container');

3. Available choices.

const myViewer = new ImgPreviewer('#image-container',{

      // aspect ratio of image
      ratio: 0.9,

      // whether to show the scrollbar
      scrollbar: false,

      // zoom options
      zoom: { 
        min: 0.1,
        max: 5,
        step: 0.1
      }

      // callback
      onInited: function (){
        // do something
      },
      
});

4. Update the picture previewed in circumstances the place new pictures are added.

myViewer.update()

Image Viewer/Lightbox Library, img-previewer Plugin/Github, responsive lightbox image gallery, bootstrap lightbox gallery demo, jquery lightbox gallery, lightbox image slider


See Demo And Download

Official Website(yue1123): Click Here

This superior jQuery/javascript plugin is developed by yue1123. For extra advanced usage, please go to the official website.

Related Posts

Iconpicker-Bootstrap-5

[Icon Picker] Iconpicker for Bootstrap 5 Icons Library

Bootstrap 5-based icon picker which supports any icon libraries like Bootstrap Icons, Font Awesome[fontawesome.com], etc. Must Read: 1000+ Pixel Perfect SVG Icons For Vue Components | Unicons How…

bootstrap-multiple-image-upload-with-preview

Bootstrap Multiple Image Upload with Preview and Delete | ImagesLoader

ImagesLoader is a standard bootstrap image upload plugin that provides an easy-to-use and nice-looking interface for uploading multiple images to a web server. Must Read: HTML 5…

Animating-Split-Flap-Displays-fallblatt

A Lightweight jQuery Plugin for Animating Split-Flap Displays | fallblatt

fallblatt is a lightweight jQuery plugin for animating split screens. This jQuery plugin allows you to include such offers in your web application. Everything from virtual departure…

bootstrap-5-dark-theme

Dark & Light Switch Mode Toggle for Bootstrap 5

Switching to dark mode is done by toggling HTML tags that include -dark or -light as a category. It is made by manipulating the DOM with JavaScript. The text color also changes depending…

jQuery-SyoTimer-Plugin

jQuery Plugin for Countdown Timer on HTML Page | SyoTimer

yoTimer jQuery plugin allows you to create digital style countdowns/periodic timers on the webpage, with callbacks support and timezone/translation customization. Features Periodic count with the specified period…

vue-js-periodic-table

Dynamic, Data-driven Periodic Table built with Vue.js

Periodicity is a dynamic, data-driven periodic table created with Vue.js that uses D3 animations and graphs to show the beauty of periodic trends. Built With vue.js (component…