Filters the image sizes automatically generated when uploading an image.
Parameters
$new_sizes
array- Associative array of image sizes to be created.
$image_meta
array- The image meta data: width, height, file, sizes, etc.
$attachment_id
int- The attachment post ID for the image.
Source
$new_sizes = apply_filters( 'intermediate_image_sizes_advanced', $new_sizes, $image_meta, $attachment_id );
You can exclude certain image types from images sizes, like gifs