Nikola Gallery Setup

Nikola has a very nice built in gallery feature that includes a JS based viewer. There are a number of changes that are needed to make Nikola's handeling of both images and galleries more useful for a site with more of a focus on photography.

EXIF Data

By default, Nikola strips all EXIF data from images. While this is nice from a privacy standpoint, a certain amount of EXIF data is important for a photographer. So, set the following in conf.privacy

PRESERVE_EXIF_DATA = True
EXIF_WHITELIST = {
    "0th": ["Orientation", "XResolution", "YResolution"],
    "Exif": ["ExposureTime", "FocalLength", "ISOSpeedRatings", "DateTimeOriginal", "Flash", "ShutterSpeedValue"],
}

Unfortunately, it would appear that the Python implementation of reading EXIF data is woefully incomplete. It does not appear to be possile to copy information such as Camera Manufacturer, or Lense information. Perhaps in the future I will work on a way of using exiftool.

Also, at least for the moment, it would appear that changes to the EXIF_WHITELIST variable do not cause the EXIF data of images in the galleries folder to be rebuilt, only the images folder. You will need to do an entire site rebuild to update images in photo galleries. See https://github.com/getnikola/nikola/issues/3357

Comments

Comments powered by Disqus