Last active
March 1, 2021 23:47
-
-
Save db-pj/498721367af10f4473ee8b9c15b0fa7e to your computer and use it in GitHub Desktop.
Delete WP generated images
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find -type f -regex '.*\-[0-9]+x[0-9]+.\(jpg\|png\|jpeg\|gif\)$' >> images-to-delete.txt | |
find -type f -regex '.*\-[0-9]+x[0-9]+.\(jpg\|png\|jpeg\|gif\)$' -exec rm -rfv {} \; | |
Disable Simple Image Sizes | |
Zero out media image sizes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment