Skip to content Skip to sidebar

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.

Sun Mon Tue Wed Thu Fri Sat
- - 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00
- - - - - - -

Supporter timezone: America/Lima (GMT-05:00)

This topic contains 7 replies, has 0 voices.

Last updated by thomasA-35 18 hours, 42 minutes ago.

Assisted by: Andreas W..

Author Posts
November 7, 2025 at 6:50 pm #17558314

thomasA-35

Background of the issue:
We have a website with 1.5 million images and are in the process of adding a new, third language. This creates some problems with the way media is translated. Currently, every image is duplicated and exists in both languages. After creating the new language, the media library is empty for this language. I understand that the expected way to handle this would be to create duplicates for the new language as well. However, with 1.5 million images, this would take ages and fill up our database with redundant data, as we don't need translated alt-texts for 99% of the images.

Symptoms:
The media library is empty for the new language, and duplicating 1.5 million images would fill up the database with redundant data.

Questions:
Is there any reason not to enable the option 'Translatable – use translation if available or fallback to default language' for the 'attachment' post type?

November 7, 2025 at 7:13 pm #17558422

Andreas W.
WPML Supporter since 12/2018

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

Timezone: America/Lima (GMT-05:00)

Hello,

The fallback will not work for media.

You will need to make sure that there is one entry for each language inside the media library.

WPML will usually handle this automatically when translating your posts and pages.

If not, revise the section WPML > Settings > Media Translation.

In the latest version of WPML, you will find a dialog that auto-detect media for translation, which is recommended. If you disable this option, you will find a dropdown to access the manual setup.

Mark all the checkboxes (existing and new content) and then click "Start the process".

This dialog will create all the necessary entries in the database. Based on the number of images, this dialog will take its time to complete the task.

If you do not sync the media, it will not show up in the second language.

Best regards
Andreas

November 7, 2025 at 7:17 pm #17558426

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi there,

Please take a look at the following feature for media handling:
https://wpml.org/documentation/getting-started-guide/media-translation/

This feature ensures that your existing media can be automatically available across all languages without needing to manually duplicate files or fill up your database.

Please go to WPML → Settings, scroll down to the Media Translation section, and make sure the new feature is enabled. Once active, it should help display your existing media across all languages without any additional setup.

November 7, 2025 at 7:51 pm #17558551

thomasA-35

Hi,
thank you both for your reply.

We already have the setting "Automatically detect best options for translating image texts" turned on. This works fine for automatic translations. However, when opening the media library or manually creating a new page in the new language, all images were still missing. This is why we started experimenting with the "use translation if available or fallback to default language" setting. It now seems to work as intended: all images appear in the media library, regardless of language or if they have been duplicated in the background.

I am just wondering why this is not default behaviour and why you think it will not work Andreas? Are there any side effects we are not considering? The default behaviour with most images missing in the media library is certainly not working for us, so this seems like a better solution.

November 7, 2025 at 9:47 pm #17558754

Andreas W.
WPML Supporter since 12/2018

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

Timezone: America/Lima (GMT-05:00)

Hi,

Let's say you already had media inside the library and then installed WPML, then WPML will sync media each time you translate a post or page that has media attached.

To generally sync the existing media, you need to follow these steps:

- Go to WPML > Settings > Media Translation and disable the option to automatically detect media for translation.

- If you disable this option, you will find a dropdown to access the manual setup.

- Mark all the checkboxes (existing and new content) and then click "Start the process".

This dialog will create all the necessary entries in the database. Based on the number of images, this dialog will take its time to complete the task.

See screenshot.

media.png
November 7, 2025 at 11:48 pm #17558797

thomasA-35

Hi,

thank you, unfortunately this does not answer my question. Let me quickly summarize what I wrote:
- We have 1.5 million images.
- We do not want them all duplicated in the database for every language, for obvious performance reasons.
- For 99% of the images, we do not need translated texts, so they don’t need to be translated.
- Using the new recommended „ Automatically detect best options for translating image texts“ setting reduces duplicates, however it leads to missing images in the media library. Also, when enabling a new language, the media library is completely empty for this language.
- Setting attachments to „ use translation if available or fallback to default language“ seems to fix this issues in our tests.

So my question is, is there any reason not to enable this setting? It seems like an obvious solution, yet it is not recommended by WPML.

November 8, 2025 at 12:37 am #17558853

Andreas W.
WPML Supporter since 12/2018

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

Timezone: America/Lima (GMT-05:00)

Yes, there is a reason not to enable "Fallback" for media, as it will not have any effect.

Please take a look at the following test site.

One-Click-Login:
hidden link

If you check WPML > Settings > Post Types Translation, you will see that WPML by default locks the field for Media (attachment) to Translatable, only showing translated items.

Our developers locked this field on purpose, as the fallback setting will not work out for this post type due to design.

Media needs to exist in the media library in all active languages to be able to be displayed everywhere on the site.

November 8, 2025 at 7:04 am #17558925

thomasA-35

Thank you for providing the demo link. You keep saying that the setting does not work or has no effect, but this is not true.

I followed these steps on your demo site:

- Enabled the „Automatically detect best options for translating image texts“ option
- Uploaded an image in the media library in English
- The image is missing in German (this is default WPML behavior)
- I then visited the translation settings, removed the lock on the „attachment“ post type (you can do that by clicking on the lock) and then set it to „use translation if available or fallback to default language“
- Now, the uploaded image is visible in the English as well as the German media library, as it should be.