If I want to create a photoblog it would be handy if I could generate HTML pages from image files containting XMP metadata (like Title and DateTimeOriginal). Creating markdown or HTML pages to use as input seems like an unnecessary step when the data is already in the image files.
Hugo can read EXIF, but not XMP or IPTC. You could use something like exiftool before each build to copy from one field to another[1] (e.g., some XMP field to the EXIF ImageDescription field). Your photo management app may do that already, or may be configurable.
Assuming the data you want is available in the EXIF tags, then yes, you can generate pages from this data. There are a couple of approaches.
exiftool can do this recursively over a directory structure with a single command, and it is very fast. ↩︎
I wanted to use IPTC fields instead of Exif ones.
Before using hugo server I use exiftool in order to generate Json files which are read by the templates :using getJSon.
See the / after the word string? That means “avoid”.
Hugo uses rwcarlsen/goexif to read EXIF data, and it can’t read the Title.
ImageDescription works fine, as does ImageUniqueID, but I would reserve the latter for a unique identifier (e.g., the signature generated by ImageMagick’s identify -verbose -format %# a.jpg).
You could also hijack Artist,Make, Model, or Software. Some site authors use the file name to generate the alt attribute; I suppose you could do the same with title.