Using/scaling photos (newbie looking at Hugo)

I’m looking at various static generators reading the docs (I haven’t actually tried Hugo yet) and Hugo looks interesting. However, there is one thing I can’t find an answer to. I usually have some photos in my posts. I have saved full resolution version of my images together with the posts. But obviously it’s not a good idea to use 4000+ pixel images on the web site. Is there some way to get Hugo to automatically create scaled versions of the images when a site it built?

If this is covered in the documentation and I’ve missed it, I would be grateful if someone could point me there.

To be more specific, if I have this

example-post.md
photo1.jpg
photo2.jpg

where photo1,jpg are full sized images. Is possible in some way to tell Hugo that it should create scaled versions so I get

example-post.html
photo1.jpg
photo2.jpg

where the postos are for example 800x600 pixels?

Not with Hugo. At least not yet. It’s on the roadmap.

But there is HugoPhotoSwipe a Python cli application that can do everything you ask while sipping tea.

And don’t let the name PhotoSwipe fool you. The author of the app has made it for use with the eponymous gallery plugin but if you don’t want to use it you don’t have to.

Also you can customize HugoPhotoSwipe, so that it exports the img shortcode that fits your needs.

1 Like

Thanks, I’ll check it out. Thanks for the answer