Use R for Creating PhotoSwipe Galleries in Hugo

What I get Real Demo: Hugo gallery with photoswipe feature Source code: http://drwater.net/RFun/makegallery.R References A tool for creating PhotoSwipe galleries in Hugo Main function Generate different size of images so that for using photoswipe feature, including LARGE, SMALL, THUMB, and COVER IMAGE for each album Auto add original datetime tags for each image Auto fix the rotation problem Auto add copyright watermark for each image It requires: imagemagick exiftools git R package exifr R package tidyverse How to use here is the folder structure I have