Error with responsive images in a multilingual site

Hi there.
Ive followed 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/”: 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:

Your shortcode should use the language permalink functions. This might be the reason your paths aren’t working.

You are sure that there is a “/content/en/future/readmore/futuro*.jpg”, right?

no, i have that on the standard folder.


and im changing the slugs to english future/readmore

ok, as a test i removed the english slug and still got error calling imageConfig: open .../content/en/futuro/leiamais/futuro.jpg: no such file or directory (original language named directories, but with the /EN/ on the front)

i assumed this would not be a problem since on that Multilingual help page it states

To avoid the burden of having to duplicate files, each Page Bundle inherits the resources of its linked translated pages’ bundles except for the content files (markdown files, html files etc…).
Therefore, from within a template, the page will have access to the files from all linked pages’ bundles.

edit: AH! ok, so when processing the .md, Hugo understands to look for resource files along another languages bundles, but in this case the shortcode doesnt know about it… right?