Skip Navigation

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 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00
- - - - - - -

Supporter timezone: America/Lima (GMT-05:00)

This topic contains 4 replies, has 3 voices.

Last updated by Andreas W. 1 year, 11 months ago.

Assisted by: Andreas W..

Author Posts
May 30, 2023 at 9:02 pm #13742577

nicolasM-63

I am trying to use S3 offload media plugin but I only have a limit of 40,000 images on my plan. Initially I thought it's more than enough because I just have 4000 images in my media library but turns out I have 66,000+ images on my wordpress website! WPML seems to be the culprit and creates duplicate database entries. How do I resolve this?

hidden link

May 31, 2023 at 6:47 am #13743441

Dražen
Supporter

Languages: English (English )

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

Hello,

thanks for contacting us.

I am afraid that is somehow expected, for each image WPML needs to create an entry in DB for other languages also, so the image can be shown in that language/pages. Otherwise image would exist only and be shown in default language.

> Please note that WPML Media Translation doesn’t duplicate any files on your site. Duplication here means that new entries are created in the database with your translated image captions, titles, meta text, and other information.

Source:
- https://wpml.org/documentation/getting-started-guide/media-translation/

Let me know if any further questions or doubts.

Regards,
Drazen

June 1, 2023 at 9:50 am #13752429

nicolasM-63

Hi,
I further discussed the issue with wp-offload media support and here is the reply that I have received.In nutshell they believe that the same media elements are used across different language media library and they proposed a solution to clean the duplicates.I am also sharing our setting for the media-translation ,perhaps we need to configure the plugin in such a way that a single media asset can be linked across multiple languages.Please review the attachment.

"By default, WPML duplicates Media Library item records for as many languages as are configured, using the same file on disk.

WP Offload Media works with Media Library items, and has integration code that makes sure that WPML's duplication of records does not break post content when an offloaded Media Library item is deleted from one language but which is still being used in another language.

As WP Offload Media's licensing is based on the number of Media Library items it is managing, not file paths, this is why your license count is greater.

We recommend turning off WPML's media duplication and switching to its "Media Translation" mechanism instead. In that way, you use a single Media Library item and just translate captions etc. If an image has embedded text, then you can optionally add different versions to different languages as appropriate.

You'll then maybe want to clean up the existing duplicate media to reduce your items count across the languages. WPML has this thread on how to remove duplicated media from your site. Please do a full backup of your site first before you do this.

https://wpml.org/forums/topic/remove-media-duplicates/

I hope this helps, let us know if you have any other questions.
"

Screenshot from 2023-06-01 13-45-19.png
June 1, 2023 at 10:13 am #13752721

nicolasM-63

Hi

Since we have a limit of uploading 40,000 objects to S3 from wp-offload media.We need to ensure we don't cross this limit at the moment across all our media libraries we have 33000 objects uploaded to production.Here is another reply that I have recieved from the wp-offload media team.

Here is the reply
"WP Offload Media relies on your Media Library to know which files to offload,
this means that if the database entry for a Media Library is duplicated, our plugin will also see this duplication."

Please let me know if there is a workaround this.

June 2, 2023 at 1:57 am #13758215

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

As my colleague said, this is expected, as this is how WPML works which is why I am not sure what you are expecting from our side at this point.

If WPML will not create duplicated media entries on the DB, then the original images will not be able to be displayed on the translated content.

This is controlled on each content inside the right sidebar of the WordPress Editor and also globally at WPML > Settings > Media Translation:
https://wpml.org/documentation/getting-started-guide/media-translation/

You could disable the duplication of media entries at WPML > Settings > Media Translation globally for newly created content, but then you would need to use WPML > Media Translation in order to upload alternative physical images in each language for each original image.

If your media translation works in this way and is looking for DB entries instead of actual physical images inside the uploads folder, then we do sadly not have any influence on this.

Best regards
Andreas

The topic ‘[Closed] Duplicate media entries in DB!’ is closed to new replies.