Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
You are trying to translate pages using WPML, but encounter broken images because the translation URL is incorrect. Specifically, SVG images are not displaying correctly on the translated pages.
Solution:
We recommend applying the workaround described in the WPML documentation for SVG support. This involves activating WPML Media to handle SVG image URLs correctly. You can find the detailed steps and more information here: WPML Errata on SVG Support.

If this solution does not resolve your issue, or if it seems outdated or irrelevant to your specific case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. Additionally, please feel free to open a new support ticket for further assistance at WPML Support Forum.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Tagged: 

This topic contains 5 replies, has 3 voices.

Last updated by bergesY 3 weeks, 4 days ago.

Assisted by: Long Nguyen.

Author Posts
October 30, 2024 at 10:17 am

bergesY

Background of the issue:
I am trying to translate all my pages with WPML, but all images are broken because the translation URL is wrong. The issue can be seen on this page: hidden link.

Symptoms:
The expected URL for the image in English is hidden link, but instead, I got hidden link.

Questions:
Why are the image URLs incorrect after translation with WPML?
How can I fix the broken image URLs in the translated pages?...

October 30, 2024 at 11:05 am
October 31, 2024 at 7:56 am #16349920

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+01:00)

Hello,
Thank you for contacting us

Before one of my colleagues gets this ticket assigned, I will recommend a few steps that might help you identify the cause of the issue and find a solution.

I can see from the image URLs you shared that the wp-content is missing in the secondary language. Please try these steps and check if the issue disappeared:
- Create a full backup of the site
- Go to Media -> Library -> Select the 'List' layout -> Switch to the secondary language using the language switcher in the admin bar, at the top -> Filter by images -> Select them all and delete them
- Go to WPML -> Settings -> Media Translation section -> In the second sub-section select all options and click 'Save' -> Then in the first sub-section select all options and click 'Start' -> Wait until the process finishes (it might take a few minutes)
- Double-check if the issue disappeared

Provide the results in your next message so one of my colleagues can continue working on this ticket.

Regards,
Carlos

October 31, 2024 at 8:11 am #16349946

bergesY

i do it but same error

November 4, 2024 at 6:36 am #16358809

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi Berges,

I apply the workaround in the documentation below, complete the translation. Now you can see the SVG image is displayed on the translation page as well.
https://wpml.org/errata/svg-support-activating-wpml-media-strips-uploads-folders-from-svg-image-url/

Looking forward to your reply.
Thanks

Home - Institut de Cybersécurité d'Occitanie 2024-11-04 13-24-09.jpg
November 4, 2024 at 8:36 am #16359244

bergesY

100000 thanks !

November 5, 2024 at 5:46 pm #16368647

bergesY

hello
i try to translate 2 image via media translation system and all translated image are killed workarround doesn't work !