My repo: nataliepjlin/up (github.com)
I want to use the percentage of width to make the image responsive just like the screenshot did.(this was changed in the inspect window)
While using the code on my repository, the rendered image looks like this:
So I change the layout/shortcodes/image.html file line 6,7 to {{ $width:= replace (replace (.Get "width") "x" "%") "px" "%" }} , but it came out as error message of execute of template failed: template: shortcodes/image.html:96:31: executing "shortcodes/image.html" at <$image.Resize>: error calling Resize: strconv.Atoi: parsing "50%": invalid syntax
Also, I tried codes from Responsive Images in Hugo | Adam Wills using {{< img src="images/blog/shop" type="jpeg" alt="" caption="" >}} in my post, but the image didn’t show up.
Is there any modification I can do to fix this? Thanks a lot ![]()
![]()

