Skip Navigation

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

Problem:
The client wanted to know how to undo the creation of language-specific versions of images in the WPML Media Translation section and why options related to Media Translation were still available even when the WPML Media Translation Addon was deactivated.

Solution:
We explained that WPML does not create duplicate physical image files but assigns new IDs with language-specific information to the same image. Unfortunately, it is not possible to undo the process once initiated. If the client wishes to remove duplicated images, they should manually delete them from the "Media" section, ensuring only the cloned images are removed, not the original media items.

For cleaning up the database entries, we suggested using the WPML Troubleshooter with the following steps:
- Go to WPML > Support > Troubleshooting
- Click on the buttons:
-- Clear the cache in WPML
-- Remove ghost entries from the translation tables
-- Set language information
-- Fix post type assignment for translations
-- Cleanup and optimize string tables

Regarding the Media Translation options appearing even when the addon is deactivated, we clarified that these options are part of the core functionality of WPML and are designed to appear regardless of the Media Translation plugin's status.

If the provided solution is not relevant due to being outdated or not applicable to the client's case, we recommend opening a new support ticket. We also highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that the latest versions of themes and plugins are installed. If further assistance is needed, please contact us through the WPML support forum.

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

Last updated by Prosenjit Barman 7 months, 1 week ago.

Assisted by: Prosenjit Barman.

Author Posts
April 28, 2024 at 4:21 am #15573330

xiaoweiX

Hi,

How can I undo these operations?

hidden link

Thanks

April 29, 2024 at 11:07 am #15576689

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,
Thanks for contacting WPML Support.

I understand what you're looking for. When you initiate the process by clicking the "Start" button in the Media Translation section with the specified options selected, WPML will create language-specific versions of the images. It's important to note that this doesn't mean WPML makes exact duplicates of the images. Instead, WPML assigns a new ID to the same image but includes language-specific information. This method ensures that WPML does not burden the server with multiple copies of the same image; it simply uses the default image and associates it with different languages through unique identifiers.

However, when you start the process, unfortunately, it is not possible to undo the process. If your concern is about duplicate images generated due to this operation, you can delete the duplicated images by going to the "Media" section. Please make sure to carefully check that you are only removing the cloned images and not the original media items.

I hope you can understand. Please feel free to let me know if there is anything else you need help with. I will be happy to assist.

Best regards,
Prosenjit

April 29, 2024 at 12:59 pm #15577251

xiaoweiX

Thanks for the clarification.

I understand that WPML doesn't duplicate the actual image (as in .jpg / .png format stored under wp-content/uploads/* etc.), my concern is that WPML does create lots of attachemt typed records in wp_posts and possibly other related tables. I was looking for a way - if possible to clean those records up just to make those DB tables as much as I can.

Situation is, my site currently have around 22000 image items in WP media library. Many of these records are simply language duplicates according to a plugin named Media Deduper. I observed the output and did see more than 8000.

April 30, 2024 at 2:41 am #15579094

xiaoweiX

Another question please:

Why are these options still availble when WPML Media Translation Addon is deactivated? hidden link

April 30, 2024 at 6:10 am #15579290

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There,

Thank you for providing more details about your situation. I completely understand your concern.

As I mentioned, WPML doesn't create duplicate physical image files but instead creates instances with language-specific information. Each of these instances contains language details and is displayed accordingly in each language version of your site. Therefore, if you were to delete these instances, you might encounter issues where images fail to load correctly in the translated versions of your pages or posts. This is because those instances link the image with its respective language context in your website's structure.

Therefore, it is generally not advisable to delete these entries from the database. Given that your site includes translations into three additional languages, the number of entries you're observing is expected.

But, if you still want to remove them, you can use any Database cleaner plugin and try to clean the entries. You can also use WPML Troubleshooter which removes the unwanted entries from the WPML database table. Here's what you can do:

- Go to WPML > Support > Troubleshooting
- Click on the following buttons:
-- Clear the cache in WPML
-- Remove ghost entries from the translation tables
-- Set language information
-- Fix post type assignment for translations
-- Cleanup and optimize string tables

I hope you can understand.

In response to your query about the Media Translation options in WPML Settings: These options are integrated into the core functionality of the WPML plugin. They are designed to appear even when the Media Translation plugin is disabled.

Please feel free to let me know if there is anything else you need help with. I will be happy to assist.

Best regards,
Prosenjit