Support » Plugin: WordPress Gallery MaxGalleria » Duplicate Images when added from earlier month?

  • Resolved VinceS2


    When adding images to a gallery from a previous month in Media Library they get copied into the current month folder and duplicates of all the other sized files turn up as well. ie it behaves as if the files were just uploaded whereas obviously they were already there. Is there a way to simply point at the correct media files in the original month folder without having them auto-copied into the current month?

    It is of course possible this is not normal behaviour, but it is what I observe. I am having some issue related to dysfunctional admin page script that I am struggling to resolve – just turned off Cloudflare to see if that is the culprit.

    Interestingly I can’t create a new NextGen Gallery either, nothing happens – I tried to do that to then import it to MaxGalleria, but no go! Not sure what issue is related to what but not enjoying it, espec since somehow all the images were deleted from a MG that still shows it has 57 images and is the one I tried to recreate,only to find I get swamped with all these duplicates. With no duplicates I have a workaround, but can I get rid of them at inception?

    Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author AlanP57


    A few years ago individuals were complaining about duplicate images created when an image was added to more than one gallery. We tried to solve this problem, but the way the media library works, if one has an image in a gallery and then adds it to a second gallery, WordPress has to create a copy of the image. We were able to prevent the duplication by simply duplicating the record in the media library database. The result was two records in the database that both pointed to the same image. And this would appear in the Media Library as two images, but then we modified the query used by the media library to not show duplicates.

    However this interfered with way some other WordPress plugins functioned, especially, The Enhanced Media Library plugin. In this case, MaxGalleria checks for the existence of Enhanced Media Library and if it finds in running on the site, then it will show what appears to be duplicate images in the database.

    I suspect that this may be happening in your case, but I not able to view your media library and galleries to verify it.

    Thus, if duplicate images are generated while adding images to a gallery, do not remove them. That is the way things work. We eliminated the actual duplicates. Thus if you delete an image, you will likely delete the only copy.

    Thank you for that great explanation Alan, but disappointingly when I checked it out the evidence didn’t match it! Unless it is something special about me, this is easy to duplicate, which I just did on a Samsung Note 4 in case it was about the PC I was using.

    If I add an image from an earlier month a full duplicate copy is created including all the 100×100 etc copies. If I re-add the same image again I get another set, this time with -1 after the filename. Repeat and it’s -2. CPanel File manager is the definitive proof, all very easy to see in there, as well as the obvious duplicates in Media Library.

    The plugin you mentioned doesn’t seem to be present. Mind you the MaxGalleria folder manager is there and doesn’t show the true folders, something I haven’t tried to sort out what is going on for.

    Undoubtedly these issues and my other post here are related in some way, but it remains elusive – sure hope it isn’t a WP update or something like that! Your site login is still valid if you are curious to have a closer look. Thank you.

    PS: Just tried adding an image from current month and, as expected, 2 images display but no duplicate files in File Manager, yet the re-added file does get a duplicate entry in Media Library. This is the case you described where to delete one of these would definitely trash the other one!

    After some considerable stuffing around I have concluded this can’t be fixed. However, in terms of website functionality, it is not really a problem. So I will just have to get over that there is some combination of phantom and duplicate images as it doesn’t really matter. Having a desire for the admin to be “tidy” is just going to have to be let go of for this issue.

    I don’t know if I am “special” here, due to something else I have unwittingly done, but disabling all other plugins didn’t get better behaviour so I am over it. I am just putting this feedback up to suggest anyone else observing this behaviour to save yourself the bother of beating yourself up trying to solve it. But if you do push through to find an answer, please do add it to this topic; I will do the same if I can’t resist having another crack at it! Thank you.

    I too am experiencing a “duplicate image in library, one file on server” that appeared after a developer created a test site in a subfolder. Could be plugin related, database related, magic server elf related… you’re not alone! PS I’m not using this plugin, but going to follow this thread to see if there is a fix 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Duplicate Images when added from earlier month?’ is closed to new replies.