1

How do you successfully disable all image compression and resizing?

I would like Wordpress to use the image exactly as it is uploaded. same pixel dimentions, same quality.

I have gone down the route of adding to functions.php multiple strings that change the thresholds and the quality like...

add_filter(
    'jpeg_quality',
    function() {
        return 100;
    }
);

No joy.

There are multiple threads on this topic across the net, lots of similar suggestions, none of them work/work with the recent Wordpress release.

Has anyone been able to achieve this?

Thanks

0

Turns out I was never too far off.

Adding this to your functions.php will stop all resizing and compression of images uploaded to the media folder

add_filter( 
    'big_image_size_threshold', '__return_false' );
add_filter(
    'jpeg_quality', function($arg){return 100;} );

    update_option( 'medium_size_w', 9000 );
    update_option( 'medium_size_h', 9000 );
    update_option( 'large_size_w',  9000 );
    update_option( 'large_size_h',  9000 );

Hope this helps someone

Thanks

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.