or for images with a given custom field value?
Since I only need these sizes for that image, doesn’t seem a good option to create unnecessary image sizes for all images.
There is a way to not generate sizes during the ACF upload, but I don’t think that it can be changed to only generate those sizes during that upload.
To not generate sizes during the ACF upload you can use an acf/upload_prefilter filter and in that filter you can add a filter as described here in the section titled Stop Generating Image Sizes Through Adding a code to functions.php.
It might be possible to disable generating a specific size as a general rule and only allow them to be generated during the ACF upload. However, this would depend on what values are available in the $_POST array and if you can detect that the upload is for an ACF field. I do not know what is included in $_POST during an ACF image upload or if there is any way to determine that the upload is for an ACF field or not.
Ahhh I see.. Thank you!!! Marking as solved 😉