WP 5.3 Removing Default WordPress Image Sizes

I’ve found several examples where they use the intermediate_image_sizes_advanced filter to unset the default WP image sizes that are generated whenever a user uploads a new image to the media library. This filter, on a brand new install with no plugins will not be called at all.

Calling get_intermediate_image_sizes() spits out the following array:

[05-Feb-2020 17:29:55 UTC] Array
(
[0] => thumbnail
[1] => medium
[2] => medium_large
[3] => large
[4] => 1536×1536
[5] => 2048×2048
)

Where did 1536×1536 come from?
Where did 2048×2048 com from?

I later tried to call remove_image_size(‘size’) from within an init action and this only worked for the two new sizes mentioned above. The other default sizes still remained:

[05-Feb-2020 17:30:26 UTC] Array
(
[0] => thumbnail
[1] => medium
[2] => medium_large
[3] => large
)

Does anyone know what’s going on here? Has something changed?

Read more here:: WP 5.3 Removing Default WordPress Image Sizes

Leave a Reply

Your email address will not be published. Required fields are marked *