Can I remove this code from media.php using a code snippet?

[ad_1]

I’m trying to get WordPress to stop creating multiple file sizes, and have managed to stop everything expect these two extra sizes in the media.php file in wp-includes. I know I could just comment out this code directly, but I thought it may get overwritten when i update WP next time.

Is there a way to prevent this code from running through a code snippet?

​

Code follows:

function \_wp\_add\_additional\_image\_sizes() {

// 2x medium\_large size.

add\_image\_size( ‘1536×1536’, 1536, 1536 );

// 2x large size.

add\_image\_size( ‘2048×2048’, 2048, 2048 );

}

[ad_2]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer