When I moved this blog over to
Hugo
slightly more than a year ago, I started using Laura Kalbag’s special img
shortcode
with img srcset
support.
To make a long and interesting story short, srcset
enables us to tell the
browser that we have for example 5 different resolutions of an image available,
and that it should choose the best one based on the user’s device.
Pretty neat actually!
Anyways, I tweaked the code a bit over time, and most recently I combined it
with the stock Hugo figure
shortcode.