Skip to content Skip to sidebar

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

Problem:
The client is adding a third language to a website with 1.5 million images and faces issues with media translation. The media library appears empty for the new language, and duplicating all images would be inefficient. The client inquired about using the 'Translatable – use translation if available or fallback to default language' setting for the 'attachment' post type to address this.

Solution:
We explained that the 'Fallback' setting for media will not work as expected. Media must exist in the media library for all active languages to display correctly across the site. To synchronize media across languages without manual duplication, follow these steps:
1. Navigate to WPML > Settings > Media Translation.
2. Disable the option to automatically detect media for translation.
3. Access the manual setup from the dropdown.
4. Check all boxes for existing and new content.
5. Click "Start the process" to create necessary entries in the database.
This process will take time based on the number of images but will ensure that media is available in all languages without filling up the database unnecessarily.

For more details on setting up media translation, visit WPML Media Translation documentation.

If this solution does not apply to your case, or if it seems outdated, we recommend opening a new support ticket. Also, check related known issues at https://wpml.org/known-issues/, verify the version of the permanent fix, and confirm that you have installed the latest versions of themes and plugins. For further assistance, please visit our 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.

This topic contains 24 replies, has 0 voices.

Last updated by Andreas W. 1 week, 3 days 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.

November 11, 2025 at 9:11 am #17565353

thomasA-35

Can maybe someone from WPML have a look at this? In our testing, enabling this setting only has advantages. We just want to make sure there are no disadvantages we are missing before we enable it on our production site. Thank you!

November 11, 2025 at 10:15 am #17565686

Andreas W.
WPML Supporter since 12/2018

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

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

My apologies, but "Fallback" will not work for media.

If you go to hidden link and switch the language in the top admin bar to "German" you will see that the image exists inside the German media library.

This happens currently automatically, as WPML recognizes the need for image synchronization for a featured image. Also, when translating the post, you will see that the media is translated on the WPML Translation Editor.

This means the image has been synced.

If I remove the image from the German media library, it will no longer show up on the translated post, even if you use the "Fallback" setting for media.

This proves that the "Fallback" is sadly not applicable to the media post type.

November 11, 2025 at 11:44 am #17566006

thomasA-35

Hi Andreas,

I appreciate your time, but I don't think you quite understand our problem. Can maybe someone from 2nd tier support have a look at this?

"If I remove the image from the German media library, it will no longer show up on the translated post, even if you use the "Fallback" setting for media."
This is expected and would not be a problem for us, we do not plan to delete images that are used in posts. What is a problem however is that older media or media WPML decides not to synchronize does not show up in the Media Library, when "Fallback" is not enabled.

November 11, 2025 at 12:16 pm #17566111

Andreas W.
WPML Supporter since 12/2018

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

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

My apologies, but I am for seven years on WPML Support and there is no need to consult a Second Tier Support; you are already being attended by a hybrid First Tier & Second Tier supporter.

The behavior is expected.

WPML syncs media by creating media library entries in each language. If those entries do not exist, the images will not show up in the second language.

The fallback option in WPML does not cover media. This is why the settings for media are locked by default.

November 11, 2025 at 12:46 pm #17566418

thomasA-35

Alright, I just want to make sure that you are 100% sure how WPML handles this from a technical perspective, because as I said I am working on a very large project with 1.5 million images, we can't just duplicate every image into 3 or more languages.

So can you please explain exactly what you mean with "The fallback option in WPML does not cover media"? I am aware that the option is disabled by default, I am asking for the reasoning behind it. WPML is promoting the new "Automatically detect best options for translating image texts" option, but without the fallback option for media this seems to be only a partial solution, you can't seriously call this "expected":

- I create a post in English with two images: one featured image, one in the content.
- None of the images I uploaded in the process of creating this post are showing up in the German media library.
- I translate the post to German.
- Now, the featured image shows up in the German media library, but the image from the content is still missing.

Please try to see this behavior from an editor point of view. None of this seems expected.
What if I want to manually create a page in German using one of the images? Or use it on a custom options page created with ACF? How should I explain to an editor why he can choose one of the images, but not the other?

Enabling the "Fallback" option fixes this in our testing. So the option does have an effect. Which is why I am asking for the technical reasoning behind not enabling this option. You must have thought about this when implementing the new "Auto detect" feature?

November 11, 2025 at 2:24 pm #17566826

Andreas W.
WPML Supporter since 12/2018

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

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

Hello,

Thank you for your patience. Let me clarify the behavior of WPML regarding the option “Translatable – use translation if available or fallback to default language” when applied to the Media (attachment) post type:

- This option does not have any effect on media attachments.

- WPML requires that each image exists in the media library for all active languages in order to be displayed correctly on translated pages.

- For this reason, the translation setting for Media (attachment) is locked by default in WPML.

- Even if it looks like the “fallback” works in some tests, what actually happens is that WPML synchronizes images by creating entries in the media library for each language. If those entries do not exist, the image will not appear in the secondary language.

Conclusion
The “fallback” option does not apply to media attachments. WPML needs synchronized media entries in each language, which is why the field is locked by design. The proper solution is to use the Media Translation feature to create those entries.

Extra Note on Media Handling
It’s important to mention that WPML does not duplicate the original media files when synchronizing images across languages. The physical file in your WordPress uploads folder remains only once.

What WPML does is create separate database entries for each active language, so that the image can appear correctly in the media library of that language and be selectable in translated content. This design avoids filling up your server with redundant copies, while still ensuring proper multilingual support.

To avoid any confusion, please keep in mind that syncing the media is the only option. Without this synchronization, the images will not be available in secondary languages, regardless of the “fallback” setting.

Best regards
Andreas

November 11, 2025 at 3:11 pm #17567354

thomasA-35

Hi Andreas,

I am really sorry, but your statements simply are not true, which is why I would kindly ask for a developer or second tier support to look at this ticket.

"This option does not have any effect on media attachments."
-> This is not true. Enabling the option makes sure that the media library always shows all images, regardless of if they have been duplicated in the background or not. You can easily test this on the demo site you created. Right now, the "Fallback" setting is disabled and so the media library is missing all but one images in German. If I turn on "Fallback", the German media library is showing all images and I can use them when manually creating a page in German. So the option very clearly has an effect.

"WPML requires that each image exists in the media library for all active languages in order to be displayed correctly on translated pages."
-> This is also not true, because the new "Automatically detect best options for translating image texts" works exactly like this: WPML determines if images need to be duplicated (e.g. if their alt or title is translated, and if not, it does not duplicate them but still displays them in all translations. So WPML does seem to be able to handle images even though they are not duplicated into all languages.

"Even if it looks like the “fallback” works in some tests, what actually happens is that WPML synchronizes images by creating entries in the media library for each language. If those entries do not exist, the image will not appear in the secondary language."
-> Also not true. I looked in the database when doing the tests in our staging environment and there was no duplicate entry created.

I do not want to argue with you and I am sorry to be so persistent, but this is a very important issue for us and I want to make sure that someone with the necessary technical understanding of how WPML works can look at this. Thank you!