Hacker News new | ask | show | jobs
by jszymborski 596 days ago
This is also pretty easy is Hugo, albeit maybe less automatic [0].

   {{ $image.Resize "600x webp q50" }}

[0] https://gohugo.io/content-management/image-processing/
1 comments

I tried this a couple years ago with Netlify and Hugo targeting 1x, 2x and 3x sized images. The processing time is too slow with more than around 500 images, resulting in build timeouts.

I switched to checking in the alternate image sizes and using a hugo image render hook to check for the existence of the alternative images to generate the appropriate srcset.