Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Clean old product images cache and orphaned product images for Magento 1
# Delete all cached images older than 365 days
find ~/public/media/catalog/product/cache/* -type f -atime +365 -exec rm {} \;
# Remove product images that are not present in the database
magerun media:images:removeorphans
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment