Use R for Creating PhotoSwipe Galleries in Hugo


What I get

References

Main function

  1. Generate different size of images so that for using photoswipe feature, including LARGE, SMALL, THUMB, and COVER IMAGE for each album
  2. Auto add original datetime tags for each image
  3. Auto fix the rotation problem
  4. Auto add copyright watermark for each image

It requires:

  1. imagemagick
  2. exiftools
  3. git
  4. R package exifr
  5. R package tidyverse

How to use

here is the folder structure I have

.                                (web <- "FOLDERNAME")
├── content
│   ├── gallery                   (mddir <- "content/gallery")
│   │   ├── Photo.md
├── src
│   └── gallery                   (fromdir <- "src/gallery")
│       ├── Photo__BRABRA
│       │   ├── DE4A8357.jpg
│       │   └── DE4A8467.jpg
├── static
│   ├── css
│   │   ├── custom.css
│   │   ├── photo_list.min.css
│   │   └── photoswipe.css
│   ├── js
│   │   ├── jquery-3.1.1.min.js
│   │   ├── load-photoswipe.js
│   │   ├── photoswipe-ui-default.js
│   │   ├── photoswipe-ui-default.min.js
│   │   ├── photoswipe.js
│   │   ├── photoswipe.min.js
│   │   ├── pswp_gallery.js
│   ├── pics                       (todir <- "static/pics")
│   │   ├── Photo
│   │   │   ├── coverimage-Photo-DE4A8357.jpg
│   │   │   ├── large
│   │   │   │   ├── DE4A8357-L.jpg
│   │   │   │   ├── DE4A8467-L.jpg
│   │   │   ├── small
│   │   │   │   ├── DE4A8357-S.jpg
│   │   │   │   ├── DE4A8467-S.jpg
│   │   │   └── thumb
│   │   │       ├── DE4A8357-T.jpg
│   │   │       ├── DE4A8467-T.jpg
│   ├── post
│   │   ├── ...

Ming Su
Ming Su
Associate Professor of Environmental Engneering

My research interest is water quality problems in drinking water bodies, with a focus on harmful algal blooms and associated taste & odor problems.