Is it possible to remove/delete all, via transformer, generated images? Leaving the original be.

Craft creates new directories to handle these images. So i could create a script in combination with a crontab that deletes said directories.

My question is if craft already has this function?

1 Answer 1


But as far as i researched, their currently is no built in feature to archive this.

I setup my server with a cronjob that runs the following script periodically: find <image-dir> -type d -regextype sed -regex ".*/_[0-9]\{3,4\}x[0-9]\{3,4\}.*" -exec rm -rv {} \;

This will delete all folders that look like this example: _650x430_center_center.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.