WP Residence Help WP Residence Help

  • WpEstate
  • How to Build Your Website
  • Video Tutorials
  • Client Support
  • API
Home / 3. Installation FAQ / How to Disable WordPress Image Compression and Preserve Original Quality

How to Disable WordPress Image Compression and Preserve Original Quality

176 views 0

By default, WordPress automatically compresses images to 85% quality when generating thumbnails.

According to the WordPress documentation, this behavior can be modified using a custom filter. By using this hook, you can change the compression level—or even set it to 100%—so resized images retain the same quality as the originals.

Add the following code to your

wpresidence-child/functions.php

// Set JPEG quality to 100%
add_filter('jpeg_quality', function($quality) { return 100; });
// For newer WP versions, also set
add_filter('wp_editor_set_quality', function($quality) { return 100; });


Next install a plugin to regenerate the thumbs and confirm after if the quality is as you wish.

After adding the code, install a plugin such as Force Regenerate Thumbnails to regenerate the thumbnails. Once done, check if the image quality meets your expectations.

You can add this snippet to your child theme’s functions.php (or a small custom plugin if you prefer):

// Show image quality filters in the admin bar
add_action(‘admin_bar_menu’, function($wp_admin_bar) {

// Get current filter values
$jpeg_q = apply_filters(‘jpeg_quality’, 82); // WP default is 82
$editor_q = apply_filters(‘wp_editor_set_quality’, 82);

// Add a small admin bar node
$wp_admin_bar->add_node([
‘id’ => ‘image_quality_check’,
‘title’ => “JPEG Q: {$jpeg_q} | Editor Q: {$editor_q}”,
‘href’ => false,
]);

}, 100);

  • Adds a small indicator in the WordPress admin bar (top toolbar).

  • When you’re logged in, you’ll see something like: JPEG Q: 100 | Editor Q: 100

  • If you still see 82, your filter isn’t being applied (or something is overriding it).

Next step if it shows wrong values

If it doesn’t show 100, you’ll need to add the filters back into your child theme, above or below your current code:

// Force JPEG quality to 100%
// Force JPEG quality to 100%
add_filter('jpeg_quality', function() { return 100; });
add_filter('wp_editor_set_quality', function() { return 100; });

Then refresh and check the toolbar again.

3. Installation FAQ

Related Articles

  • How to update to WordPress 6.7 and Elementor 3.26 in WpResidence Theme
  • How to disable LiteSpeed Cache options to verify correctly the theme functionality
  • Videos: How to edit demo content homepage after demo import
  • 404 – Page Not Found on Properties and Categories pages

WP Residence Documentation

  • 1. General
    • How to Get Support
    • Get your buyer license code.
    • Use SSL / https
    • Server / Theme Requirements
  • 2. Installation
  • 3. Installation FAQ
  • 4. Advanced Search
    • Advanced Search Display Settings
    • Advanced Search Form
    • Geolocation Search for Half Map
    • Save Search Theme Options
    • Advanced Search Colors
  • 5. Agent, Agency & Developers
  • 6. Property Page
  • 7. Properties List
  • 8. Property Taxonomies
  • WpResidence Elementor Studio
  • 10. Blog Posts & Blog List
  • 11. Shortcodes
    • Contact Form
    • Featured Agency/Developer
    • Membership Packages
    • Testimonials
    • Google Map with Property Marker
    • Listings per Agent, Agency or Developer
    • Display Categories
    • Agent List
    • Recent Items Slider
    • Recent items
    • List Properties or Articles by ID
    • Featured Agent
    • Featured Article
    • Featured Property
    • Login & Register Form
    • Icon Content Box Shortcode
  • 12. Widgets
  • Theme Options
    • General Settings
    • User Types Settings
    • Appearance
    • Logos & Favicon
    • Header
    • Footer Style and Colors
    • Price & Currency
    • Property Custom Fields
    • Features & Amenities
    • Listing Labels
    • Theme Slider
    • Permalinks
    • Splash Page
    • Social & Contact
    • Map Settings
    • Pin Management
    • How read from file works
    • General Design Settings
    • Custom Colors Settings
    • Header Design & Colors
    • Mobile Menu Colors
    • User Dashboard Colors
    • Print PDF Design
    • Property, Agent, Blog Lists Design Settings
    • Sidebar Widget Design
    • Font management
    • How to add custom CSS
    • Custom Property Card Unit – Beta version
    • Email Management
    • Import & Export theme options
    • reCaptcha settings
    • YELP API Integration
    • iHomefinder Optima Express IDX
    • MEMBERSHIP & PAYMENT Settings
    • Property Submission Page
    • PayPal Setup
    • Stripe Setup
    • Wire Transfer Payment Method
  • Translation
  • FAQ
  • Pages
  • Header
  • Footer
  • Google or Open Street Maps
  • Payment Options
  • Plugins
    • Included Plugins
    • Third Party Plugins – IDX Compatibility
    • Third Party Plugins – Multi Languages
    • Third party Plugins – Other
  • Technical
    • Technical how to | Custom Code Required
    • Technical: Child Theme

Join Us On

Powered by WP Estate - All Rights Reserved
  • WpEstate
  • How to Build Your Website
  • Video Tutorials
  • Client Support
  • API