1.0.0 • Published 6 years ago

lg-exif v1.0.0

Weekly downloads
8
License
MIT
Repository
github
Last release
6 years ago

lightgallery-exif

A plugin for lightgallery which adds an exif panel

Demo

Using It

  • Copy the files from the dist folder to your own project.
  • You can choose either minified or non-minified, you only need one of the sets - both are not necessary.
  • Add the stylesheet + script into your html files (where you created the lightgallery):
<link rel="stylesheet" href="css/lg-exif.min.css">
...
<script src="js/lg-exif.min.js"></script>

There are 2 ways for this plugin to work.

1) Use EXIF info from the image files themseleves. This plugin can scrape the exif info off of the thumbnails that are on the page. This is the simplest if you already have the info hanging around.

2) Use data attributes for images in the gallery. Below is a list of data attributes / corresponding exif names

EXIF Info Provided

EXIF ValueData Attribute
Filenamedata-filename
DateTimeOriginaldata-datetimeoriginal
FNumberdata-fnumber
ExposureTimedata-exposuretime
ISOSpeedRatingsdata-isospeedratings
FocalLengthdata-focallength
LensModeldata-lensmodel
Modeldata-model
Makedata-make
GPSLatitudedata-gpslatitude
GPSLongitudedata-gpslongitude
GPSLatitudeRefdata-gpslatituderef
GPSLongitudeRefdata-gpslongituderef
GPSAltitudedata-gpsaltitude

Building It

It couldn't be much easier to get a minifed version from scratch!

$ npm install
$ npm install -g gulp-cli     # If you don't already have gulp globally installed
$ gulp

Attributions