Support

Account

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.