Images Syncing Multiple Copies

I’m running version Version 1.6.1 of Patreon Wordpress plugin on a new install of WordPress 5.4.2.

The WordPress site is https://aspiringknight.com
I’ve set it to sync with my Patreon account at https://www.patreon.com/m/aspiringknight

Thankfully it is a new campaign, because both the images on the Patreon posts are syncing a new copy every time. My hard drive will fill up if this is not taken care of. The posts come across fine. The images are getting copied again ad again.

Help?

Are these images which have been inserted to more than one post at Patreon? Ie, the same image is inserted to Post 1, and then Post 3 etc?

Nope. Each exists in only one Patreon post.

It seems to not recognize that it already has the image in WordPress and copies it again.

Do you have any image related plugins? Any plugin that renames images, auto creates thumbnails, CDN etc?

I do not. Here is the comp[lete plugins list. (This is brand new site, only a few days old.)

Does your site use any CDN? Ie at the domain level - like Cloudflare?

Nope. It is Centos, WHM/cPanel/WordPress. The machine is hosted with Rackspace Cloud. I even tried turning off all the other plugins and turning the sync back on. The images are repeating again.

I just had an idea. In WordPress, there is an option (Settings -> Media) to “Organize my uploads into month- and year-based folders”. Could WordPress be moving the images and the Patreon plugin thinks they got deleted and need to be re-uploaded every time it checks?

1 Like

It seems to have worked…

If the images are moved after they are entered in the media library, yes, this could happen. Good to hear that turning it off worked.

Ill look into this for future releases.

I think it is a newer feature in WordPress. Definitely something to note and perhaps work around. If the plugin looks in /uploads then it won’t find it. But if it follows the link in the post, it should get the correct path. Till than people should turn off the feature.

1 Like

Hi there,
I had the same problem and this seemed to have worked for me too. Thanks for posting it!

Do you have any advice about how to figure out which of the duplicate images can be deleted? I was going to export all the media and look at the file structure as exported but the plugin I usually use for that isn’t working. And looking at my media file structure through my host page is not terribly helpful.

Hey! This is going to be looked at soon, but for now you can manually delete images.

Hello, I have the same problem. A public Patreon Post with images inserted into text makes duplicates of the images. I think it happens as often as the post syncing.
From the image manipulation plugins, I use:

  • ShortPixel Adaptive Images
  • Cloudflare CDN
  • WP Rocket
1 Like

A fix is available for this below:

To use this beta, just deactivate/delete your existing Patreon WordPress plugin. Then upload and activate the zip you downloaded from dropbox above. When the fix is out in the new version, you can just upgrade to the new version from your WP admin.

What this fix does is to use image’s own contents to uniquely identify the image instead of using its filename from Patreon.

This will cause all images to be re-imported once when you start a full import (manual or auto), but after that images wont come in duplicates. And correct images will be inserted in all posts, this time from singular image sources. (If an image is in two posts, only one image will be used properly instead of 2 images.)

If you have not used the images which the plugin imported before in any post, then you can delete them manually. You will have to do it just once. Sorry for the discomfort.

If you encounter any issues, just let me know.

I tried this and it still imported multiple copies of the images. Before installing, I deactivated the existing Patreon WordPress plugin, but I didn’t delete any of the posts or images that were already there.

Should I do that and start an import from scratch?

Well, since the existing images wont be deleted, yes, you should delete those manually. They are not deleted because there is no way to know whether you used any of those images in a non-imported post.

Also, you need to set the settings to update posts from Patreon. Otherwise when you do a manual import, the posts wont be re-imported.

Do you still have the multiple image import issue after doing repeated imports?

1 Like

Yes. I basically started from scratch with the plugin above a few days ago. I deleted all posts and all images that had been imported from Patreon, deleted them permanently from trash, and deleted and reinstalled/reauthenticated the plugin and did a fresh import.

I did still get multiple images imported to my library even after all that.

However, after that I did change one setting : Update local posts from the ones at Patreon

I changed that from yes to no, and then when I imported posts, I didn’t get any more duplicate images pulled in. Only the new ones.

When I was going through deleting dupes, I noticed that some of the duplicate images have -scaled appended on the filename, so I don’t know if that’s also a contributing factor—that it’s pulling in multiple scale versions of the same image.

When I was going through deleting dupes, I noticed that some of the duplicate images have -scaled appended on the filename, so I don’t know if that’s also a contributing factor—that it’s pulling in multiple scale versions of the same image.

Then they are not duplicates, but an image plugin or other feature at your site producing resized version of images. Thumbnail plugins as well as WP itself can do that. You may want to examine it from that angle.