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.

Tagged: 

This topic contains 2 replies, has 1 voice.

Last updated by Nigel 2 weeks, 6 days ago.

Author Posts
December 18, 2025 at 11:01 am #17674220

Kristof

Currently, we encounter the problem that thumbnails do not get translated. We are using the Media translation plugin to translate media files. Selected thumbnails from the original language do not get used in the translation.

I've found the `WPML_Media::get_post_metadata` function in the `wpml-media-translation/classes/class-wpml-media.php` file. I've used `add_filter('get_post_metadata', [$this, 'get_post_metadata'], 10, 4);` to hook the function and then all thumbnails get translated correctly

December 22, 2025 at 9:29 am #17681624

Alejandro
WPML Supporter since 02/2018

Languages: English (English ) Spanish (Español ) Italian (Italiano )

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

Hey there! just so you know, we're asking one of our devs to investigate more about this situation!

As Paola said, we have a similar issue with the gallery images, we're trying to verify if this problem could be linked to it.

Regards,

December 22, 2025 at 5:16 pm #17683067

Nigel
WPML Supporter since 02/2016

Timezone: Europe/Madrid (GMT+01:00)

Hi Kristof

Could I please get more details from you?

Reading through the above thread, I could not see a clear description of the steps involved in provoking the problem.

By thumbnails I assume you mean the featured images.

On a vanilla test site there are no problems displaying the correct featured image on translated posts, whether they are the same featured image as the original language post, or a "translated" featured image which uses a different image file set in WPML > Media Translation.

Here's a link to a sandbox where you can see that working correctly: hidden link

That link will log you in as an administrator.

Here's a post which has a cat on the English original, but switch to Spanish and you will see a dog: hidden link

This post uses the same image on both languages: hidden link

It sounds like you are having a different experience.

Does the same thing happen if you switch to a default theme?

Can you clarify where you are employing the workaround of adding the filter callback?

The topic ‘[Closed] WPML Thumbnail translation’ is closed to new replies.