2

When i upload to a media, Wordpress is resize it to many version like that

2016-04-03_23-36-35-90x65.png
2016-04-03_23-36-35-120x80.png
2016-04-03_23-36-35-360x240.png
2016-04-03_23-36-35-480x320.png
2016-04-03_23-36-35-600x400.png
2016-04-03_23-36-35-768x391.png
2016-04-03_23-36-35-840x420.png
2016-04-03_23-36-35-840x543.png
2016-04-03_23-36-35-1067x480.png

How can i disable it? I just want to just orginal size.So my wordpress version is 4.5.3.

  • Settings-->Media and setting each box for width and height to 0 This is not worked for wp 4.5.3 – Erdal Bakkal Jun 24 '16 at 12:49
6

WordPress has some standard images thumbnail,medium,medium_large,large for which image sizes you can set it under Settings --> Media except medium_large size whose default height set to 768px ( medium_large is available from WP4.4).

So when you set 0 to in the media settings it won't generate thumbnail,medium size,large size images and it didn't as far as I can see from your generated sizes. So the generated images are added by the active theme or plugins you are having.

Anyway we can remove those image sizes using the following code.

function wpse_230632_remove_image_sizes() {
    foreach ( get_intermediate_image_sizes() as $size ) {
        remove_image_size( $size );
    }
}
add_action('init', 'wpse_230632_remove_image_sizes');

One thing remained and that is medium_large size, for this:

We need to set medium_large_size_w and medium_large_size_h to 0 . You can set this in db directly or update option once like this:

update_option('medium_large_size_w',0);
update_option('medium_large_size_h',0);

Now try to upload sample image and check image sizes, you will only see original image.

  • The medium_large trick is amazing, i don't know why wp devs don't bother to add it to the interface! but waste time on emojis... – Michael Rogers Mar 7 '18 at 13:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.