Hi there.
Ive followed https://dev.to/stereobooster/responsive-images-for-hugo-dn9 to have a shortcode with responsive images on the site. And it works as advertised!
However… I think noones tried using it on a multilingual site yet.
This is the error i am getting (not on code format to have linebreaks):
ERROR 2019/07/27 23:11:17
“…/content/futuro/leiamais/index.en.md:14:1”: failed to render shortcode “img”: failed to process shortcode:
“…/layouts/shortcodes/img.html:81:11”: execute of template failed: template: shortcodes/img.html:81:11: executing “shortcodes/img.html” at <imageConfig ($src.RelPermalink | printf “content/%s”)>: error calling imageConfig: open …/content/en/future/readmore/futuro*.jpg: no such file or directory
edit: here the error specifies the english page, without another language version it worked fine
the culprit code seems to be {{ $img := imageConfig ($src.RelPermalink | printf "content/%s" ) }}
the only time its used is to pass on width/height information width="{{ $img.Width }}" height="{{ $img.Height }}"
i think i can do without that info on the images i want to use the shortcode, but if anyone has an idea, im all ears
ive modified the code a bit after looking for a solution and reading about scratch (couldnt make it work)
the whole (heavily annotated, with links and examples) code is at: https://gist.github.com/bronze/72817b404b3fd98f222aade59dddd69e