Skip to content Skip to sidebar

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

Problem:
The client wants to know if it's possible to:
1. Automatically delete all translations of a media file when the original is deleted, but only for media files, not for posts/pages.
2. Ensure that media uploaded in the primary language (English) is available in all other languages, but media uploaded in other languages should not be available in other languages.
Solution:
1. Currently, WPML does not provide an option to apply automatic deletion settings exclusively to media files. This setting, if enabled, applies to all content types including posts and pages.
2. For the media availability settings, you can manually configure this in WPML → Settings → Media Translation. You should disable the option 'Automatically detect best options for translating image texts' and then set up the desired behavior for each language manually.
For further customization, you might consider using WPML hooks. You can find a list of available hooks here: WPML Hooks Reference.

If this solution does not fully address your needs or seems outdated, we recommend opening a new support ticket. We also advise 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. For further assistance, please visit our support forum 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.

This topic contains 1 replies, has 0 voices.

Last updated by Andrey 1 week, 5 days ago.

Assisted by: Andrey.

Author Posts
April 1, 2026 at 7:23 am #17941865

jelleS

One of are clients are cleaning up there media library. And they requests if following is possibly.
1. When deleting image, all translations also be deleted. We know that there is a global option but that is also for Posts/Pages. We don't want that, we want to only be applying this for Media. If we can hook into an action or filter then that is possibly because we have knowledge of PHP.
2. Next thing is, when user upload in primary language (English) that image is available in all other languages. But when image is uploaded in other language it shouldn't be available in other languages. Is this possible?

Looking forward to hear from you.

With best regards,
René

April 2, 2026 at 5:14 pm #17946741

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Hello René,

Thank you for contacting WPML support.

1. In the WPML interface, there is no option to apply this setting only to Media.

2. There is also no direct option for the second request. You can either duplicate the image to all languages or not in WPML → Settings → Media Translation. Then disable “Automatically detect best options for translating image texts” and configure the settings manually according to your needs.

For reference, you can find the list of available WPML hooks here:
https://wpml.org/documentation/support/wpml-coding-api/wpml-hooks-reference/