When you are changing themes on a site or altering the image sizes used on a WordPress site, you’ll have to regenerate all the image sizes. Maybe you ran into the situation that you want to move the site and will have to generate new images again, after the move. For those that have SSH access to their site or local development environment, here are two simple tips I used for as long as I can remember them 😁.
Find & delete generated images
By default WordPress stores the generated image files in the following format:
// WordPress generated image file names <your-image-file-name>-SIZExSIZE.jpg // Example for a thumbnail image size my-wonderful-image-of-a-cat-150x150.jpg
The files generated will be stored in the uploads folder, usually within the wp-content folder on your site. On Linux based server or macOS, you usually have access to the find command:
The aforementioned commands will find and delete the generated image sizes for you, but be careful, it’s a very powerful command.