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 4 replies, has 2 voices.

Last updated by jeannetteM 3 weeks, 4 days ago.

Assigned support staff: Bruno Kos.

Author Posts
September 21, 2019 at 2:58 pm #4616253

jeannetteM

Hi

We encounter the problems mentioned under https://wpml.org/forums/topic/delete-image-in-all-languages/#post-2752830 and https://wpml.org/errata/media-files-are-not-deleted-when-the-option-when-deleting-a-post-delete-translations-as-well-is-active/.

Unfortunately, our customer did not delete the translated images but only deleted the image in the primary language. What's the fastest way to delete all the translations of images that no longer exist in the primary language?

Many thanks

September 23, 2019 at 7:58 am #4621443

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

Thank you for contacting WPML support!

I'm afraid there isn't a way now, because these images are in fact only being pulled due to meta values stored in database. The proper way would be go to WMPL -> Settings -> Posts and pages synchronization -> and check the following:

- When deleting a post, delete translations as well
- When deleting a taxonomy (category, tag or custom), delete translations as well

And then delete images from original media library and that would wipe up translations in media library within other languages.

Regards,
Bruno Kos

September 23, 2019 at 9:01 am #4621851

jeannetteM

Hi

Thanks for your reply!

The problem with these settings is, that deleted images remain on the server (see links in initial post).

Would it be a possibility to delete all image translations and then in WPMLs media translation settings use the function to translate all existing images? We do not have any different images in the translations.

Many thanks

September 23, 2019 at 11:24 am #4623045

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

I think this is what you are looking for:
https://wpml.org/documentation/getting-started-guide/media-translation/#media-translation-settings

The options for translating media can be found at the bottom of the WPML -> Settings page.

As for removing translations, the only way is now to change the language while on media library, select those images and delete.

Regards,
Bruno Kos

September 23, 2019 at 12:24 pm #4623733

jeannetteM

I will delete all image translations and recreate the translations using the settings mentioned.

My issue is resolved now. Thank you!