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.
Tagged: Documentation request
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: Symptoms: Questions: |
| 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 |
| 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: 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, 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. |
| 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: 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: 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 |
| 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." |
| 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. Please try to see this behavior from an editor point of view. None of this seems expected. 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 Extra Note on Media Handling 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 |
| 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." "WPML requires that each image exists in the media library for all active languages in order to be displayed correctly on translated pages." "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." 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! |
