Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images not rendered in alternative language #666

Open
yonz2 opened this issue Dec 12, 2023 · 0 comments
Open

Images not rendered in alternative language #666

yonz2 opened this issue Dec 12, 2023 · 0 comments

Comments

@yonz2
Copy link

yonz2 commented Dec 12, 2023

Hi,

I defined two languages in my hugo.yaml file English (Default) and German

theme: 
  - github.com/theNewDynamic/gohugo-theme-ananke
languageCode: 'en-us'
DefaultContentLanguage: en 
languages:
  en:
    title: 'My Company'
    weight: 1
    languageName: English
  de:
    title: 'Meine Firma'
    weight: 2
    languageName: Deutsch

I have two markdown files ("offering.md", and "offering.de.md"), both have the following content:

...
![Placeholder for Offerings Image](images/Offerings_16x9.png)

## Our Offerings
...

The placeholder is, in both language versions, rendered as:

<img src="images/Offerings_16x9.png" alt="Placeholder for Offerings Image">

however the base URL for the German has an de at the end, so when I switch to German, the browser is looking for the image at http://127.0.0.1:1313/de/images/Offerings_16x9.png and of course not finding it. As it is actually located at http://127.0.0.1:1313/images/Offerings_16x9.png

How can I fix that?

Any help will be much appreciated
Yonz

p.s.
I'm running this on Github CodeSpace:

@yonz2 ➜ /workspaces/myproject (main) $ hugo version
hugo v0.120.4-f11bca5fec2ebb3a02727fb2a5cfb08da96fd9df linux/amd64 BuildDate=2023-11-08T11:18:07Z VendorInfo=gohugoio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant