How To Stop WordPress From Compressing JPG Files

WordPress Automatic JPG File/Image Optimization

WordPress automatically compresses JPG files, which can hurt your websites load speed and SEO. JPG is related to the Joint Photographic Experts Group (JPEG) image file format. JPG files also have 2 sub formats, JPG/Exif which is used in digital cameras and photographic equipment, and JPG/JFIF which is often used on the internet.

  • To maintain high quality JPG files exactly how you uploaded them, disable WordPress from automatically compressing your JPG files.

Copy and paste this code into your current theme’s functions.php file to disable WordPress compression:

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

Sean Doyle

Sean is a distinguished tech author and entrepreneur with over 20 years of extensive experience in cybersecurity, privacy, malware, Google Analytics, online marketing, and various other tech domains. His expertise and contributions to the industry have been recognized in numerous esteemed publications. Sean is widely acclaimed for his sharp intellect and innovative insights, solidifying his reputation as a leading figure in the tech community. His work not only advances the field but also helps businesses and individuals navigate the complexities of the digital world.

13 Responses

  1. July 18, 2012

    […] How To Stop WordPress From Compressing JPG Files – Bot CrawlMay 15, 2012 … WordPress automatically compresses JPG files, which can hurt your websites load speed and SEO. To maintain high quality JPG files exactly … […]

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.