-
I'm experiencing an issue with my mkdocs project where images are not displaying correctly when I switch the language from the default (English) to Vietnamese. The problem arises because the URL adds a "vi" prefix, causing the image paths to break. Here are the details of the issue: Steps to Reproduce: Expected Behavior: Actual Behavior: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi, are you talking about your own images or images belonging to Material? I assume you are using the static i18n plugin? There are context variables that would allow you to adapt any URLs in templates. In the pages I guess you should adapt the URLs manually? That seems the straightforward solution to me. If your question is about images produced by Material then that might be something for us to look at but we would need a minimal reproduction to we have something to go be. |
Beta Was this translation helpful? Give feedback.
OK, I can see that you are using the static i18n plugin. I assume you want the same images for both languages. The solution would be to use a relative path in the Vietnamese version that gets you out of the
vi
path and back to a path that does not include a language specifier. It might look something like this:
in a.vi.md
file indocs/
.