Title: Remove WordPress Image Compression?
Last modified: September 7, 2023

---

# Remove WordPress Image Compression?

 *  Resolved [phoenixblue](https://wordpress.org/support/users/phoenixblue/)
 * (@phoenixblue)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/remove-wordpress-image-compression/)
 * Hi. This isn’t completely related to oceanwp, but I was wondering if anyone can
   help me? I noticed that every photo I uploaded on WordPress is lower quality (
   automatically compressed by WordPress). I tried adding many variations of codes
   in the functions.php of oceanwp, but none of them work. Do you know a code I 
   can add that will remove WordPress’s automatic image compression?

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Shahin](https://wordpress.org/support/users/skalanter/)
 * (@skalanter)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/remove-wordpress-image-compression/#post-17035095)
 * Hello [@phoenixblue](https://wordpress.org/support/users/phoenixblue/),
 * There are some methods to turn it off.
    To disable WordPress’s automatic image
   compression, you add the following code to the function.php file:
 *     ```
       function disable_image_compression() {
         add_filter('jpeg_quality', '__return_false');
       }
       add_action('init', 'disable_image_compression');
       ```
   
 * Also, you can use the following code for specific file types:
 *     ```
       function disable_image_compression_for_jpg() {
         add_filter('jpeg_quality', '__return_false', 10, 2);
       }
       add_action('init', 'disable_image_compression_for_jpg');
       ```
   
 * Another method is using a third-party plugin(s) for this. So you can search in
   the WordPress repository to find a plugin to do this: [https://wordpress.org/plugins/](https://wordpress.org/plugins/).
 * Furthermore, this feature is available in some optimizer plugins. You can find
   this feature by checking the plugin features if you are probably using one of
   them.
 * I hope it helps.
    Best Regards
 *  Thread Starter [phoenixblue](https://wordpress.org/support/users/phoenixblue/)
 * (@phoenixblue)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/remove-wordpress-image-compression/#post-17036926)
 * Thanks for the reply. I don’t know why but it still doesn’t work for me. I added
   the code, but when I upload a photo, it still looks blurrier than the original.
   I tried a plugin that also didn’t work.
 * Sometimes, it seems to work, then after a while, the picture goes back to being
   blurry. It makes no sense.
 *  Thread Starter [phoenixblue](https://wordpress.org/support/users/phoenixblue/)
 * (@phoenixblue)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/remove-wordpress-image-compression/#post-17039586)
 * Update: I solved my problem. Apparently, my hosting company was compressing my
   images without my knowledge. They had a CDN feature auto enabled that was compressing
   my images. I turned it off, and everything is fine now.
 *  [Shahin](https://wordpress.org/support/users/skalanter/)
 * (@skalanter)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/remove-wordpress-image-compression/#post-17040184)
 * I’m glad that you were able to resolve that.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Remove WordPress Image Compression?’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/oceanwp/4.1.6/screenshot.png)
 * OceanWP
 * [Support Threads](https://wordpress.org/support/theme/oceanwp/)
 * [Active Topics](https://wordpress.org/support/theme/oceanwp/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/oceanwp/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/oceanwp/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Shahin](https://wordpress.org/support/users/skalanter/)
 * Last activity: [2 years, 9 months ago](https://wordpress.org/support/topic/remove-wordpress-image-compression/#post-17040184)
 * Status: resolved