Home / Admin / Disable WordPress image compression
Duplicate Snippet

Embed Snippet on Your Site

Disable WordPress image compression

<10
Code Preview
php
<?php
// Disable image compression
add_filter( 'jpeg_quality', 'smashing_jpeg_quality' );
function smashing_jpeg_quality() {
return 100;
}
// Disable image scaling
add_filter( 'big_image_size_threshold', '__return_false' );

Comments

Add a Comment