Hello,
I’ve read Multilingual mode | Hugo and the various related topics here, notably Share images between multilingual posts - #2 by jmooring, which seemed to be the answer to my question, but I’m apparently unable to make it work.
I am creating a multilingual (currently, en and fr) site, using file-based translations and with the en and fr contents being put in subdirectories under the main url (e.g. http://example.com/en/...
) and in several cases, a post has FR and EN translations and features an image. The image is the same for both languages. I expected I could obtain what I want with
content \
posts\
my-post\
index.md (or index.en.md)
index.fr.md
my-image.jpg
Where index.md
/ index.en.md
contains

and index.fr.md
contains

I’d expected both posts to show the image, except only the en
shows it, because in the static site, the img
tags’ src
attribute is just "my-image.jpg"
, but the my-image.jpg
file exists only on the en/ side.
What am I doing wrong?