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
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.