• Resolved partyz

    (@partyz)


    Hi,

    it’s absolutely frustrating. I turned off the native resize function by setting 0 in Settings -> Media (all fields set to 0). Not working, when using MLM it still makes 768x and 252x images. So I edited my theme’s function.php file and added:

    remove_image_size('large');
    remove_image_size('medium');
    remove_image_size('thumbnail');

    Guess what – it is still making those two variants after every upload. How to turn it off? If it is not possible – which lines should I remove or edit in the plugin’s files?

    Thank you in advance.

    • This topic was modified 7 years, 12 months ago by partyz.
    • This topic was modified 7 years, 12 months ago by partyz.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author AlanP57

    (@alanp57)

    Media Library Plus use a WordPress core function to create metadata and thumbnails: wp_generate_attachment_metadata() and I’m not aware of a way to tell the function which registered thumbnails sizes to generate or not generate.

    Note that the documentation for remove_image_size() states that it, “Cannot be used on reserved image size names”, and those are: ‘thumb’, ‘thumbnail’, ‘medium’, ‘large’, ‘post-thumbnail’.

    Thread Starter partyz

    (@partyz)

    OK, I’ll try to override this behavior. Thank you very much.

    I found this solution on the Internet. It is working.

    add_filter( 'intermediate_image_sizes', 'delete_intermediate_image_sizes' );
    function delete_intermediate_image_sizes( $sizes ){
    	return array_diff( $sizes, array(
    		'medium_large',
    		'large',
    	) );
    }
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Plugin keeps resizing my images’ is closed to new replies.