How to skip the creation of landscape thumbnails for an original portrait image
You were headed in the right direction. There is another filter out there that handles intermediate_image_sizes_advanced. You can add or remove custom sized thumbnails in there. Rather than NOT creating your landscape custom sizes on a Portrait upload, maybe try to only create the landscape custom sizes on a landscape upload. add_filter( ‘intermediate_image_sizes_advanced’, function( $sizes, … Read more