Home › Forums › General Issues › Limit image sizes created for ACF image field › Reply To: Limit image sizes created for ACF image field
If you were talking about not creating image sizes for custom images sizes added with add_image_size(), https://developer.wordpress.org/reference/functions/add_image_size/ then I think it would be possible using acf/upload_prefilter https://www.advancedcustomfields.com/resources/acfupload_prefilter/.
I don’t know that it is possible but in this filter you might be able to call remove_image_size() on the custom sized you do not want to create.
But, if you read the documentation for remove_image_size() https://codex.wordpress.org/Function_Reference/remove_image_size it says
Note: Cannot be used on reserved image size names
There isn’t anything in WP that will let you stop WP from creating the 3 images sizes that are built in.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.