Gallery3:Modules:dupcheck - Gallery Codex
Personal tools


From Gallery Codex


Duplicate image checker. -- An attempt at an MD5 module to do some duplicate checking/etc.

Here is what the module does as of now:

1) Upon activation, it adds a new table to the DB (fullsize_md5sums) and sets a warning that photos need to be scanned for missing md5s
2) Adds a maintenance task that will allow you to scan all photos and insert any missing MD5s in the DB
3) Upon adding (or changing) an image to the gallery, will insert the MD5 into the DB automatically
4) Upon deleting an image from the gallery, will delete the MD5 from the DB for that image
5) Adds a 'Gallery Photo Duplicates' menu item to ADMIN->CONTENT menu which currently loads a dynamic album with duplicate thumbnails
  5a) On the duplicate item album page, shows the thumbnail of the image that has duplicates
  5b) Under the thumbnail there are links to each image location where it's duplicated - the links show which album it's in
  5c) This check for duplicates across ALL of the gallery, not just in a particular album - (Maybe will code this later, but not now)

6) Shows what a bad coder I am via the php code... :)
7) Works from what I can tell/test/etc.


This module may be downloaded from the codex here.

To install, extract the "dupcheck" folder from the zip file into your Gallery 3 modules folder.

Afterwards log into your Gallery web site as an administrator and activate the module in the Admin -> Modules menu.

After that, run the newly created maintenance task for scanning for MD5SUMs in the Admin -> Maintenance menu.

Version History

  • v8 - Misc bug fix(es) for delete link added for v7

  • v7 - Will now provide a warning when uploading a duplicate image via the normal web way and provide an option to delete it. (Will display warning after click DONE when uploading) - thanks Sangie

  • v6 - Cosmetic change when rounded percent = 0, changed to 'less than 1%' - thanks AvutonOlrich

  • v5 - Added a warning when the MD5SUM of an image is invalid - now admin will see the offending image to solve in the event of an invalid image or something - thanks AvutonOlrich

  • v4 - Added in the maintenance run to remove DB entries for any invalid MD5SUMS (picture was removed, modified, etc. outside the gallery) - thanks AvutonOlrich

  • v3 - Added a 'delete' link in the context menu under each photo - thanks cwallace91472

  • v2 - Fix for when no duplicates are found - thanks floridave!

  • v1 - Initial Release