Skip to content Skip to sidebar

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

Problem:
The client is trying to delete images from their multilingual WordPress site to free up space. They have deleted images from the English media library, but the images remain in the media libraries of other languages. The client is unsure if they need to delete the images from the FTP server or if each image gets duplicated for each language.
Solution:
We recommend enabling the option in WPML > Settings to 'delete translations when deleting a post'. This setting ensures that when you delete an image from the default language, it also deletes the entries in other languages, effectively removing the file completely from the server. Images are not duplicated across languages; there is only one file with multiple database entries for different languages. If this option was not enabled when you initially deleted the images, you would need to manually delete them from the other language libraries. For future deletions, having this setting enabled will streamline the process by removing images from all languages simultaneously.

Please note that this solution might be outdated or not applicable to your specific case. 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 the issue persists, 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 3 replies, has 3 voices.

Last updated by Mihai Apetrei 1 year, 8 months ago.

Assisted by: Mihai Apetrei.

Author Posts
August 13, 2024 at 10:01 pm #16068132

shelleyG

Background of the issue:
The site hidden link has become very large, over 2 GB. I am trying to delete some photos from the galleries to free up space. I have deleted the images from all website pages and am now attempting to delete the images and their corresponding sizes from the media library.

Symptoms:
When I delete images from the English media library, they are still present in the media libraries of the other languages. The images are still accessible and counted in the image library of the other languages.

Questions:
Am I going to have to delete the image from the FTP server side to actually delete an image from the server?
Does each image get duplicated for each language, which could explain the large size of my site?

August 14, 2024 at 6:04 am #16068721

Dražen
Supporter

Languages: English (English )

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

Hello

while you wait for one my colleagues to take over let me try to help you quickly.

From WPML > Settings enable the option when deleting post delete translations as well. Image attached.

As for images they are not duplicated for each language, they are just duplicated database entries as it need to exist in both languages, and in the media library you will see them for each language, but actually, only 1 file exists.

After enabling the option above you can delete the file in the default language and it will delete entries in other language as well, which should remove the file completely then.

Hope this helps.

Regards,
Drazen

Screenshot.png
August 14, 2024 at 4:35 pm #16071961

shelleyG

Ok well hopefully that will work when I am deleting images inside the media library.

I have adjusted the gallery project posts already to not be linked to those images

Then I go to the media library and delete the image so it does not exist on the server anymore using up space.

It sucks that I have to go through and delete all 300 images again though.

That is a lot of time wasted.

I am not sure that an image counts as a post

Since I have already deleted those images in the default language will I have to delete from the other two languages separately or can I delete from one language and it will delete from the other.

August 14, 2024 at 10:30 pm #16072661

Mihai Apetrei
WPML Supporter since 03/2018

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hi Shelley,

Thanks for the follow-up! I understand how time-consuming this process can be, and I’m here to help make it as smooth as possible.

If you’ve already deleted the images from the default language and didn’t have the option enabled to delete them from other languages simultaneously, you will need to delete them manually from the other language libraries.

However, going forward, if you enable the option in WPML > Settings to delete associated translations when deleting posts (including media), it should help streamline things by removing those images from all languages in one go.

Let’s make sure you won’t have to go through this again!

Regarding what you said: "I am not sure that an image counts as a post"

The way WordPress works is that it has post types. Posts, Pages, Products (if you have an online store), Media entries, each of these ones are called "Post types" and that's how WordPress functions. It's not an actual post like a blog post, it is a post type, in our case, media files (the media post type).

I hope this clears things up, but if you ever encounter any other situation where you need help with WPML, please feel free to open a new ticket for each unique issue and we will be happy to help and properly handle each issue one by one.

Kind regards,
Mihai Apetrei