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):
-
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:
Then refresh and check the toolbar again.