Skip to content

Instantly share code, notes, and snippets.

View praful-rajput's full-sized avatar
🎯
Focusing

Praful Rajput praful-rajput

🎯
Focusing
View GitHub Profile
<?php
/*
* This script deletes duplicate images and imagerows from the database of which the images are not present in the filesystem.
* It also removes images that are exact copies of another image for the same product.
* And lastly, it looks for images that are on the filesystem but not in the database (orphaned images).
*
* This script can most likely be optimized but since it'll probably only be run a few times, I can't be bothered.
*
* Place scripts in a folder named 'scripts' (or similar) in the Magento root.