WP Rentals Help WP Rentals Help

  • Client Support
  • Video Tutorials
  • WpRentals
  • WpEstate
  • API
Home / Technical how to / How to Disable WordPress Image Compression and Preserve Original Quality

How to Disable WordPress Image Compression and Preserve Original Quality

29 views

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

wprentals-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; });

2. Regenerate Thumbnails

After adding the code:

  1. Install a plugin like Force Regenerate Thumbnails.

  2. Run the plugin to regenerate all existing thumbnails.

  3. Check if the images now look crisp and sharp on your site.

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

Optional: Show Current Image Quality in Admin Bar

To confirm the quality filters are applied, you can add a small indicator to your admin toolbar. Add this snippet to the same functions.php file:

// 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);

When logged in, you’ll see something like:

JPEG Q: 100 | Editor Q: 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 still shows 82 or another number, the filters are not being applied, and you may need to add them again above/below your existing code:

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

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

Notes & Recommendations

  • After regenerating thumbnails, clear your caching plugin (if any) to see updated images.

  • Make sure your images are originally high-resolution; increasing JPEG quality does not enlarge a low-resolution image.

  • This method works for WpResidence, WpRentals, or any WordPress theme using standard WordPress media handling.

Technical how to

Related Articles

  • How to Change the Default Categories Icon from Listing Card Unit
  • How to change the background color and logo for admin login page
  • How to redirect Instant Booking Button to WooComemrce Checkout Page
  • Tehnical: Redirect to Page Not found/ White screen on listing submission or edit

HELP CATEGORIES

  • 71. General
  • 102. Installation & Basic Setup
  • 393. How Booking Works
  • 20Advanced Search
  • 19Elementor Free & WP Rentals Studio
  • 13Email Notifications
  • 10FAQ
  • 14Installation FAQ
  • 10Menu Options
  • 27Multi-Languages - 3rd party
  • 32Owner & Renter
  • 9Page Templates
  • 24Property / Listing
  • 21Shortcodes
  • 4Supported Maps
  • 97Technical how to
  • 5Third Party plugins
  • 3Translation
  • 3WordPress Blog Post
  • 13WordPress Widgets
  • 12WP Rentals Payments
  • 78WP Rentals Theme Options

Join Us On

Powered by WP Estate - All Rights Reserved
  • Client Support
  • Video Tutorials
  • WpRentals
  • WpEstate
  • API