I’m wanting to create a short code that stubs out the html that I want when rendering images. As part of this I need to know the dimensions of the source image so that I can lay things out correctly so that I don’t get content jumping down the page as images load in.
Currently I’m thinking of creating a gulp task that looks for images in the generated hugo output and then replaces it with the stub I need, but that won’t really work all that well with hugo server
. Hence why I’m thinking there must be a way of reading the image dimensioned from within the Shortcode but don’t quite know enough Go to pull this off.
Any pointers?
Note, I know there are other topics talking about generating different sizes of an images, etc… here I am just trying to keep it simple and read the image size.