HUGO

I built a Hugo module which generates srcsets

I built this module which generates automatic srcsets for your Markdown images: https://github.com/jan-xyz/hugo-module-img-srcset

All you need to do to get source sets now is:

In your hugo project run

hugo mod get -u github.com/jan-xyz/hugo-module-img-srcset

and add the module to your config.toml :

...
theme = [ "github.com/jan-xyz/hugo-module-img-srcset"]
...

I hope this helps someone :slight_smile: I was looking for something like this for quite a while and was actually pointed by @bep into the correct direction today: https://github.com/gohugoio/hugo/issues/5034#issuecomment-706602779

6 Likes

Nice.

In your installation instructions, the first step (hugo mod get -u) should not be needed. Adding it to your config.toml should be enough.

2 Likes

Very cool! :1st_place_medal:

1 Like

@bep thanks, I didn’t know that! I removed it from the README.