Up to 8 copies of a single image
-
So we are busy with a major tidy up of our now 10 year old blog (in staging). Apart from basic update maintenance, we haven’t updated any content in years, so much so we hadn’t noticed there are now up to 8 copies of a single image in the WP Media library, but mostly 4 identical copies of 1. Identical, in that they are all the same size, same title, same alt text, .jpg all that. So which one of the copies do we delete? Even these tidy up plugins don’t know which one to delete and end up deleting an image still in use.
Last time we checked the media library it had about 1200 images. It now has 6995, and we know we didn’t put them all there.
This poor site has been moved around quite a bit in the last 10 years, even before it got to Siteground, then it got moved from SingleHop to Google Cloud, cPanel to SiteTools. I have also tried a few different optimising plugins over the years, W3TC included. Now using just Speed Optimizer. At least if we can rule out what could not have caused this I can spend more time looking at what might have caused this.
I guess this is one problem with leaving a site unattended for too long. You end up forgetting exactly what you did and when you did it, which makes troubleshooting things like this a bit of a challenge.
One theory I have is while experimenting with SG Optimizer as it was when I first used it I might have checked the box that made back up copies of all images when changing compression levels. I might have done this more than once. Also switching webp on and off, along with cron jobs not working properly at one point. Cron is now working fine.
It’s beginning to look like the only way to clean this mess up is by manually going through the entire library, 1 image at a time, then checking each of the 76 posts to verify if any images go missing. My wife and I, each with 2 screens could get it done in a day.
As mentioned, I have tried 2 plugins, Media Deduper and Media Cleaner. No joy. They either delete the wrong image, or miss the ‘copies’.
Looking in the File Manager I can see the various images sizes that WP makes on upload as well as the webp versions created by Speed Optimizer. I’m still trying to figure out if there are in fact copies in the files as seen in the media library.
Another theory I have is the database is maybe referencing the same image multiple times, which then shows as multiple copies of the same image in the WP media library. Is that even possible?
But my main theory is multiple backups of images made by the Speed Optimizer when playing with compression levels, and cron not working properly and the process subsequently failing, or something to that effect.
The page I need help with: [log in to see the link]
- The topic ‘Up to 8 copies of a single image’ is closed to new replies.