Image Storage

I’m migrating a site with several gigabytes of photos and growing. Admittedly, this is not enormous, but part of my doesn’t think storing images in GitHub and including them in every build is the best?

I’d love to hear advice on image handling/storage in general.

  1. Where do others with large blogs store all their images?
  2. If in the repo, where in your directory structure? In the content folder? In the assets folder? In the static folder?
  3. What image optimization steps do others take? External CDN service? Optimization in the build step? If in the build step, how do you avoid optimizing images which have already been optimized in successive builds?

Heavy assets need to be stored away from Git as the repo size will soon become unmanageable.

However Hugo currently does not have an API to fetch a remote image resource and process it.

Therefore, if this is for a professional blog, I would recommend looking at commercial image storage providers with CDN hosting.

Cloudinary has been mentioned in this forum in the past, however note that beyond the free tier it is a very expensive service.

Perhaps others can share other solutions.