TIL Hugo can figure out image dimensions at build time

I&rsquo;d been hardcoding width and height attributes in my Hugo templates to prevent layout shift. It worked fine, but it was tedious — every time I changed an image, I had to look up the new dimensions and update the template by hand. Today, I had to add a new image to the sidebar, and I felt lazy enough to ask copilot to find the dimensions for me and insert them into the template. It instead…