• kenworthysonpartor234


    Hello members,
    The image quality of every upload I’ve made to my WordPress website has recently reduced, and I assume that WordPress is compressing them automatically. Since I would rather be in charge of the image quality, I would like to disable or turn off this automated image compression option. I’ve done some web research and tried a few different code pieces, but nothing seems to be working. The problem was not fixed even by the SMNTCS plugin, which is designed to manage this. Can someone offer advice on how to successfully turn off WordPress’s automatic picture compression? We would be very grateful for your assistance

    I appreciate it in advance.

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • You can add the below to either your theme’s functions.php file or a custom plugin.

    To disable the big image size threshold, you can do this:

    add_filter( 'big_image_size_threshold', '__return_false' );

    To set the JPEG quality to the highest (uncompressed), use this:

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

    Note that these will not revert existing images. The changes will only take effect for newly-uploaded images.

    Hello, Justin,

    I’m encountering the same problem and I copied your code and added it to one snippet in Code Snippets as follows, but it did not work.

    The image at–
    –downloads with a file size of 892 KB, but I uploaded an image with a file size of 2.30 MB.

    Your assistance is greatly appreciated.

    // To disable the big image size threshold
    add_filter( ‘big_image_size_threshold’, ‘__return_false’ );

    // To set the JPEG quality to the highest,uncompressed
    add_filter( ‘jpeg_quality’, function() {
    return 100;
    } );

    Hello, Justin,

    I found the problem. I overlooked the JPEG quality setting on the plugin I am using, “Easy Watermark”.

    I apologize for any inconvenience this post caused.


    Hello Justin,

    just tried the code and it works perfectly. Thanks for sharing.

    Just case of stop WordPress from automatically compressing images, you can follow these steps:

    1. Access Your WordPress Dashboard: Log in to your WordPress admin panel.
    2. Go to Settings: Click on “Settings” in the left-hand menu.
    3. Select Media: Within the Settings menu, select “Media.”
    4. Adjust Image Sizes: You will find various options for image sizes. These include Thumbnail size, Medium size, and Large size. By default, WordPress may apply compression to these sizes. To prevent this, you can set these sizes to “0” (zero). This tells WordPress not to generate those sizes, which can help prevent additional compression.
    5. Save Changes: Don’t forget to click the “Save Changes” button at the bottom of the page to apply your settings.

    By following these steps, you can have more control over the compression of your images in WordPress, allowing you to maintain the quality and avoid automatic compression.

    To prevent WordPress from automatically compressing images, you can make adjustments through both regulation and law. First, within the WordPress platform itself, you can explore the settings related to image compression. Navigate to the “Settings” menu, then select “Media.” Here, you may find options to adjust the image compression settings or disable automatic compression.

    On the regulatory front, it’s essential to comply with existing laws governing digital content and data. Ensure that your website aligns with applicable regulations such as the General Data Protection Regulation (GDPR) or other data protection laws in your jurisdiction. These regulations often include provisions related to user consent and the handling of personal data, which may indirectly impact how images are processed.

    In addition, consider checking if there are specific laws or guidelines in your region that pertain to website accessibility and user experience. Adhering to these regulations can influence how you handle images on your WordPress site.

    By combining platform-specific adjustments with a mindful approach to relevant regulations, you can work towards preventing automatic image compression on your WordPress website while staying within the bounds of the law.

    Actually, i was also stuck in the same problem that when i upload and publish the picture it seem virtually not visible clearly .i was using an additional plugin(Third party) to write by blog post. You can use your default editor to overcome this problem which is given by the wordpress.

    I experienced the same problem when I download the images from the WordPress . Help me out please.



    I’m currently experiencing the same problem with DNG format file uploading. I tried the solutions above, but the time it’s been uploaded to wordpress, it’s been compressed badly. Please help me out. 🙂

    • This reply was modified 1 month ago by hanyc666.
Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.