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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 -

Supporter timezone: Asia/Singapore (GMT+08:00)

This topic contains 10 replies, has 0 voices.

Last updated by Kor 3 days, 4 hours ago.

Assisted by: Kor.

Author Posts
July 7, 2025 at 7:37 pm #17211110

mathiasA-14

Background of the issue:
I am trying to translate property listings using WPML in a WordPress website built with the WpResidence theme. When a listing is translated, WPML duplicates the featured image. This behavior only happens on the translated versions of the listings. The original listings display images correctly. Link to a page where the issue can be seen: hidden link

Symptoms:
The translated listing shows the featured image twice: once as the main image and again as part of the image gallery.

Questions:
Why is the featured image duplicated in the translated listings?
How can I prevent the featured image from appearing twice in the translated listings?

July 9, 2025 at 2:35 am #17216649

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for reaching out. I can see the duplicated image on your primary language listing. To check if this is related to WPML, could you please deactivate WPML and create a new listing? Let me know if the issue still occurs afterward.

July 19, 2025 at 5:08 pm #17252562

mathiasA-14

Hi, I've been investigating the issue of the duplicated featured image in translated listings when using WP Residence with WPML, and I believe I’ve identified the exact source of the behavior.

Here’s what I tested:

I created a new listing in English with a featured image and a gallery.

Then I translated that listing into Spanish.

Immediately after the translation, the featured image appeared twice in the translated version — once as the main image (as expected), and again within the gallery.

This behavior happens consistently every time a translation is created. However, I noticed something interesting:

I edited an already translated listing, deleted all the images (including the featured image), and uploaded new ones.

After saving, the translated listing no longer showed the duplicated image. The featured image was displayed correctly, and it was not repeated in the gallery.

This suggests the issue doesn’t come from the theme or the frontend rendering, but rather from what happens at the moment WPML creates the translation. Specifically, it appears that when WPML copies the featured image from the original listing, it also includes it as a gallery attachment — possibly because the featured image from the original post is treated as an attachment and isn't filtered out when duplicating.

Additionally, I tested the following:

I went to WPML → Media Translation and disabled the option “Duplicate featured images for translated content.”

After that, when creating new translations, the featured image was no longer assigned automatically, which prevented the duplication issue in the gallery.

However, now the entire gallery gets duplicated — all images from the original gallery are copied and attached again, but the featured image field in the translated listing is left empty and has to be manually assigned.

This confirms:

If WPML duplicates the featured image → it appears twice (featured + gallery).

If WPML does not duplicate it → the featured image is missing in the translation, and the gallery is duplicated anyway.

Could you please confirm whether WPML includes the featured image as a regular attachment when duplicating a listing?
And is there any way to prevent that image from being inserted into the gallery while still keeping it correctly assigned as the featured image in the translated post, without having to edit every listing manually?

Thanks!

July 21, 2025 at 5:13 pm #17256964

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply. Duplicating the featured image should not display both on the listing. Something is wrong there and I will need to closely examine your website. Therefore, I will require temporary access (WP-Admin and FTP) to a test site where the problem has been replicated, if possible. This will enable me to provide better assistance and determine if any configurations need to be modified.

Please note that it is important to have a backup for security purposes and to prevent any potential data loss. You can use the UpdraftPlus plugin (https://wordpress.org/plugins/updraftplus/) to fulfill your backup requirements.

Your upcoming reply will be treated with confidentiality and will only be visible to you and me.

✙ To resolve the issue, I may need your consent to deactivate and reactivate plugins and the theme, as well as make configuration changes on the site if necessary. This emphasizes the significance of having a backup.

July 23, 2025 at 6:27 pm #17265375

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply. I’ve identified the issue on your staging site. Could you please try to replicate the same issue on our sandbox site here:
hidden link

I’ve already installed the WPML plugin for you. Please go ahead and install the required theme and any additional plugins needed to reproduce the issue. Once done, let me know so I can escalate this for further investigation.

July 23, 2025 at 6:30 pm #17265378

mathiasA-14

Hey Kor! Can I import a full backup of my site?

July 23, 2025 at 6:32 pm #17265386

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply. Sorry, that's not allowed. Please let me know how it goes.

July 23, 2025 at 6:40 pm #17265438

mathiasA-14

WP Residence is a theme that requires a paid license; it's not possible to install it from scratch. We need to find another solution.

July 24, 2025 at 1:29 am #17265746

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thank you for your patience.

I regret any inconvenience caused, but to proceed with troubleshooting, I kindly ask for a snapshot of the site. Alternatively, with your permission, I can create one myself. For this purpose, I typically recommend using the free plugin "Duplicator." If you're already familiar with Duplicator (https://wordpress.org/plugins/duplicator/), please skip the following steps and simply send me the archive file you downloaded.

To guide you further, please adhere to these instructions:

1. View the Duplicator instructions video: hidden link

2. Consult WPML's instructions on providing supporters with a copy of your site: https://wpml.org/faq/provide-supporters-copy-site/

3. If the archive file exceeds 400MB, please use Duplicator's file filters to exclude cache, wp-uploads directory, media, and archive files.

Once you have the archive file ready, kindly share the link with us. You can utilize platforms like Google Drive, Dropbox, or similar for file sharing, as the snapshot file might be large.

Please note that your next reply will be private, visible only to you and me. You can paste the file link there. Rest assured that once the issue is resolved, I will delete the local site.

July 28, 2025 at 11:49 am #17274733

mathiasA-14

Hi Kor, apologies for the delay. You have my permission to create the snapshot — go ahead.

July 28, 2025 at 5:19 pm #17276389

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your patience. I've downloaded a copy of the site and I will investigate this further and will come back to you as quickly as possible.