Skip to content Skip to sidebar

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

Problem:
You uploaded a different image for the English version in WPML media translation for your Pinterest image, but when sharing on Pinterest, the English site still displays the German image. The description translates correctly, but not the image itself.
Solution:
If you're experiencing this issue, we recommend you try the following steps:
1. Go to WPML-> Settings-> Custom Fields Translation section.
2. Set the

shariff_metabox_media

field to Translate.
3. Click Save.
4. Edit the post in the default language.
5. Make a minor edit and update it.
6. Edit the translated post using the WordPress editor.
7. Add the translated image URL manually and update the translated post.

Please try these steps on a sandbox site first. If the problem persists, it might be due to outdated solutions or a different issue. We highly recommend 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. If necessary, please open a new support ticket at WPML support forum for further assistance.

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 0 reply, has 1 voice.

Last updated by Osama Mersal 8 months, 2 weeks ago.

Assisted by: Osama Mersal.

Author Posts
January 15, 2025 at 12:05 pm #16596952

svenjaK-2

Background of the issue:
I uploaded a different image for english in media translation for my Pinterest image using WPML. I use a plugin called Shariff Wrapper for social media shares. I followed your documentation for changing media in different languages.

Symptoms:
The English site still shows the German Pinterest image when I try to share the image to Pinterest, although I have saved an English image in my media translation. The description is correctly translated but not the image itself.

Questions:
Why does the English site show the German Pinterest image instead of the translated English image?

January 16, 2025 at 10:45 am #16601344

svenjaK-2

Can you help me please?

January 19, 2025 at 2:41 pm #16610621

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

Thanks for contacting WPML forums support. I'll be glad to help you today.

First of all, sorry for the late reply; it was due to a higher workload.

Please log in to this hidden link">sandbox site and install the "Shariff Wrapper" plugin.

Then, please try to replicate the issue. If it is reproducible, please let me know so I can check it and consult our compatibility team.

Best regards,
Osama

January 22, 2025 at 4:46 pm #16624409

svenjaK-2

I recreated the problem in the sandbox, please have a look

January 23, 2025 at 7:33 am #16625763

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

1) Thanks for replicating the issue. I created a new test post. Please check it and let me know if it works correctly. (hidden link)

2) I noticed that the "Pinterest Image" field in the translated post is empty. Please try to edit the translated post, add the translated image URL, and update the translated post to check if that will fix the issue.

Best regards,
Osama

January 25, 2025 at 10:57 am #16633461

svenjaK-2

Hello,

1) in your test post it works correctly but I do not know how you made that or where my mistake is
2) I do not understand - I added the pinterest image in my test post via the shariff plugin in the post editing sidebar , have a look at the screenshot please. I do not want the pinterest image to appear in the post, only when you click the share button.

Bildschirmfoto 2025-01-25 um 11.52.37.png
January 25, 2025 at 11:48 am #16633537

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

Please try the following steps:

1- Go to WPML-> Settings-> Custom Fields Translation section
2- Set the "shariff_metabox_media" field to Translate
3- Click Save
4- Edit the post in the default language
5- Make a minor edit and update it
6- Edit the translated post using the WordPress editor
7- Add the translated image URL manually and update the translated post

Kindly try the above steps on the sandbox site and let me know if that fixes the issue.

Note: I've done the first three steps, so you don't need to do them.

Best regards,
Osama

January 25, 2025 at 1:44 pm #16633598

svenjaK-2

I tried and that works. It also works on my website. But why does it not work in the media translation tab? This is not an easy way to do it, especially if I make changes in the post later.

January 26, 2025 at 9:07 am #16634580

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

Thanks for your reply. This plugin is not officially compatible with WPML, so this workaround fixes the issue.

I noticed that if you use the image in the post, the media translation works correctly.

However, if the image is not added to the post, a workaround is needed to have different images for each language.

Best regards,
Osama

February 3, 2025 at 5:18 pm #16663929

svenjaK-2

Can I add a custom xml configuration? I have to use this workaround on every single blogpost...

February 4, 2025 at 7:53 am #16665100

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

Here is an XML code to set this field as translatable.

<wpml-config>
  <custom-fields>
    <custom-field action="translate">shariff_metabox_media</custom-field>
  </custom-fields>
</wpml-config>

You will need to do the steps starting from step 4.

Best regards,
Osama