It looks like there is a filter for the $sizes
array generated when using wp_generate_attachement_metadata() called intermediate_image_sizes_advanced
.
I found this snippet that should do the trick if you put this in a functions file of some sort (normally it would probably go in your functions.php file):
/**
* Snippet Name: Disable auto creating of image sizes
* Snippet URL: http://www.wpcustoms.net/snippets/disable-auto-creating-image-sizes/
*/
function wpc_unset_imagesizes($sizes){
unset( $sizes['thumbnail']);
unset( $sizes['medium']);
unset( $sizes['medium_large']);
unset( $sizes['large']);
}
add_filter('intermediate_image_sizes_advanced', 'wpc_unset_imagesizes' );
The above snippet should remove all of the default Wordpress image sizes from the $sizes
array used in wp_generate_attachment_metadata() and only generate any custom image sizes you have added.
NOTE: I have not tested this code, but it looks straight forward to me.
If you want the filter to only effect your "own admin interface" you may not want to put the snippet in a separate functions file that only gets called in your admin interface.
See the developer reference for the function and the hook below: https://developer.wordpress.org/reference/functions/wp_generate_attachment_metadata/
https://developer.wordpress.org/reference/hooks/intermediate_image_sizes_advanced/