Change the JPEG quality used by WordPress image-editor operations with the jpeg_quality filter. Return a higher number for generally less aggressive compression and larger files, or a lower number for smaller files and more visible artifacts. Test representative images because WordPress does not define one universally best value.
Set JPEG quality with the jpeg_quality filter
Add this PHP code to a site-specific plugin or your child theme’s functions.php:
add_filter( 'jpeg_quality', function ( $quality ) {
return 82;
} );
The value is the JPEG quality WordPress uses when resolving a default for image-editor operations such as resizing and editing a JPEG. The official hook reference documents a 0–100 scale and describes the hook as filtering JPEG compression quality for backward compatibility (WordPress Developer Resources).
- A higher value generally preserves more detail, with larger output files.
- A lower value generally reduces file size, with more risk of blocking, ringing and lost fine detail.
- The result depends on the source image, dimensions and encoder, so compare actual outputs rather than assuming a particular value is optimal.
Generate a new thumbnail or test upload after adding the filter, then compare file size and visible quality at the display dimensions your site uses.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problems#1 Best Overall
- User-Friendly Portable Photo Printer for iPhone, Android & PC - Get beautiful and colourful memories with Liene 4x6 photo printer! After opening the entire package, you can find one cartridge + 20 sheets of photo paper (placed inside the machine packaging), as well as an additional box containing 80 sheets of photo paper (which includes two cartridges + 80 sheets of photo paper). Full package includes smartphone photo printer, Liene 4x6 photo printer papers (100 sheets), 3 colour cartridges, and fully sealed cassette to prevent dust. Minimalist and magnetic design for compact storage.
- Superior Quality 4x6 Photo Printer - Print photos like no other thanks to the thermal-dye sublimation tech adopted by the picture printer for iphone. The dyes deeply penetrate the paper for vibrant photo printing, and the laminated surface is resistant to water, scratches, fingerprints and fading. Clean the print head promptly if smudges are observed on printed photos during operation. Get Liene photo printers now for yourself and your loved ones, print your happy moments together and keep your love forever!
- Wi-Fi Photo Printer for Smartphone - The built-in hotspot of the photo printer makes it easy to print pictures from your phone, avoiding outside interference with a fast and stable connection. No other networks required! Simply connect your device to the independent instant photo printer 4x6 hotspot.
- Multiple Device Compatibility - Liene phone printer provides instant photo printing for up to 5 simultaneous connections. Share with family and friends or print from your different devices. No additional cables or Bluetooth required when printing photos with this picture printer. Note: Ensure the ink cartridge clicks into place before printing.
- Customize your Printing with the Liene App - Customize your photos with our specialized App! You can add a Square border, insert filters, enhance the contrast and brightness, check printing status, and more. You can even print your ID and Visa photos from home with this photo printer for iphone 4x6 prints.
What the setting changes—and what it does not
It applies when WordPress processes an image
The documented jpeg_quality contexts are image_resize and edit_image when a JPEG is saved. It affects image-editor work performed after the filter is active; it is not a global switch for every image operation performed by every plugin.
It does not rewrite existing files
Changing the filter does not automatically re-encode existing uploads or thumbnails in the Media Library. Existing generated sizes need an intentional regeneration or reprocessing workflow. Before bulk, lossy reprocessing, keep the originals and verify that your backup can restore them.
Rank #2
- Dock Photo Printer: The KODAK Dock Plus is a home photo printer that produces high-quality 4x6” prints directly from compatible smartphones. Featuring an integrated docking station, users can place their phone on the printer for better connection while simultaneously charging the device during printing.
- Genuine 4PASS dye sublimation printing: Each photo is produced in three color layers and finished with a clear protective lamination layer. In approximately 55 seconds, you receive a smooth, detailed print designed to resist fingerprints, water, and fading for long-lasting quality.
- Easy to Use: Print photos quickly without complicated setup or technical steps. Simply power on, connect wireless bluetooth, and start printing within seconds. The Dock Plus is built for straightforward operation, making it ideal for first time users and everyday photo printing.
- Home Printing Station: Designed for stable desktop use, this dock photo printer connects to a power outlet for consistent performance and larger 4x6” prints. Ideal for home printing, photo albums, framing, family events, and everyday picture printing.
- KODAK Photo Printer APP: Featuring integrated Bluetooth connectivity, this portable printer connects to compatible iOS and Android devices through the KODAK Photo Printer app. Edit, crop, and customize your photos before printing for creative results.
An explicit quality argument can win
The filter supplies a default. If code calling the image-editor API passes a quality explicitly, that supplied value takes precedence over the default filter. A plugin or custom integration can therefore produce a different quality from the value in your site-wide snippet.
Choose the right WordPress quality hook
| Hook | Use it when | What it provides |
|---|---|---|
jpeg_quality |
You need one JPEG-specific default. | A simple JPEG quality filter for image-editor output; explicit caller-supplied quality can override it. See the hook reference. |
wp_editor_set_quality |
You need different policies by format or image size. | The callback receives quality, MIME type and image dimensions, allowing format- or size-aware rules. See the hook reference. |
WordPress documents 90 as the WP_Image_Editor default. That is an API default, not a recommendation for every site (WP_Image_Editor::set_quality()).
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Rank #3
- From America's most trusted printer brand, the HP Envy Photo 7975 is a premium multi-purpose home printer with everything families need to learn, work, and create. Loaded with features to print high-quality photos, homework, office docs and everything else. It's also AI-enabled to intuitively adapt to your workflow, with wireless and security features that keep your multifunction printer up to date and secure.
- PERFECT FOR HOME - The HP Envy Photo 7975 is great for printing documents, high-quality true-to-screen borderless photos, creative projects and more. Print speeds up to 10 pages per minute color, 15 pages per minute black.
- PERFECTLY FORMATTED PRINTS WITH HP AI - Print web pages and emails with precision-no wasted pages or awkward layouts; HP AI easily removes unwanted content, so your prints are just the way you want.
- KEY FEATURES - Print, copy, scan, automatic 2-sided printing, advanced photo features, separate photo tray, auto document feeder, mobile and wireless printing.
- EFFORTLESS PRINTING - Smoothly navigate printing with a large intuitive printer color touchscreen.
Understand the documented quality range
The legacy jpeg_quality reference lists values from 0 to 100. The image editor’s set_quality() method documents 1–100 and maps zero to one for compatibility. Use a value in the editor’s supported range rather than relying on values outside it.
For example, return 82; is a valid starting test value, not a promise of a particular percentage reduction or visual result. Inspect both desktop-sized images and small thumbnails: artifacts can be more noticeable after repeated resizing or at different display sizes.
Rank #4
- 2x3" Portable Photo Printer: The upgraded PP01 photo printer uses advanced inkjet technology. This portable photo printer produces vivid, full-color prints on premium sticky-backed photo paper that is smudge-proof, water-resistant, and tear-resistant. The Nelko mini photo printer is pocket-sized and weighs only 308g, making it ultra-portable for school, travel, and field trips. Each ink cartridge prints up to 80 full-color 2x3 photos on sticky-backed paper
- Easy Printing via Bluetooth: The PP01 mini photo printer is compatible with iOS and Android phones via Bluetooth. Simply download the Nelko app from Google Play or the App Store. Load the 2x3 photo paper with the smooth side facing down. Install the ink cartridge, connect via Bluetooth, and print directly using the Nelko app. A USB charging cable is included; the adapter is not included
- High Photo Quality: This mini photo printer uses advanced inkjet technology for clear, vibrant prints. This portable photo printer produces 600 DPI high-resolution images with precise colors, capturing fine details and realistic tones. Each photo comes with adhesive backing, perfect for scrapbooks and preserving your memories. Personalize every photo for holidays, birthdays, or daily events
- Powerful App: The Nelko 2x3" PP01 photo printer app lets you edit photos and offers a variety of frame designs, making it perfect for personalizing your photos for projects like scrapbooking or journaling. Download the Nelko app to create collages and customize photos with filters, graffiti, borders, stickers, text, AI image editing, and many other features. Edit photos on your phone, then send them to the Nelko app for instant printing in under 90 seconds
- Versatile Usage Scenarios: This portable photo printer is ideal for travel journals, party favors, and family gatherings. Students use it for planners and photo printing. Crafters use it for DIY projects, custom labels, and scrapbooking. It's a practical tool for bloggers, small businesses, and event photographers to create instant giveaways. Perfect for Mother's Day surprises and heartfelt moments with loved ones using Nelko sticky-backed photo paper.
Use a size-aware policy with wp_editor_set_quality
If large photographs, medium cards and small thumbnails need different defaults, use the broader hook. It exposes the MIME type and dimensions so your callback can branch on those values. Keep the policy narrow and document why each threshold exists; other code can still pass an explicit quality.
add_filter( 'wp_editor_set_quality', function ( $quality, $mime_type, $width, $height ) {
if ( 'image/jpeg' === $mime_type && $width >= 2000 ) {
return 85;
}
return $quality;
}, 10, 4 );
For JPEG output, WordPress also resolves the legacy jpeg_quality filter in its quality path. Read the current hook and method documentation before combining callbacks, because callback priority and an explicitly supplied quality can affect the final result.
Best Value
- Dual 4x6" & 3x3" Photo Printer Paper Tray Convenience: Seamlessly print both 6-inch standard photo paper and 3-inch sticky-backed paper with our innovative dual tray design. This compact phone photo printer for smartphone offers easy storage and quick access, making it perfect for diverse printing needs without taking up much space. Enjoy vibrant, high-quality prints every time.
- Fast Bluetooth Connectivity: Experience lightning-fast printing with our liene photo printer's Bluetooth connection, which pairs in just 13 seconds. Enjoy a seamless and efficient printing experience, perfect for capturing and sharing memories on the go without the hassle of cables or complex setups.
- Superior Quality Photo Printer 4x6 - Print photos like no other thanks to the thermal-dye sublimation tech adopted by the picture printer for iphone. The dyes deeply penetrate the paper for vibrant photo printing, and the laminated surface is resistant to water, scratches, fingerprints and fading. Get Liene photo printers now as amazing gifts for yourself and your loved ones, print your happy moments together and keep your love forever!
- Multiple Device Compatibility - Liene picture printer for iphone provides instant photo printing for up to mutiple simultaneous connections. Share with family and friends or print from your different devices. No additional cables required when printing photos with this phone printer.
- Customize your Printing with the Liene App - Customize your photos with our specialized App! You can add a Polaroid border, insert filters, enhance the contrast and brightness, check printing status, and more. You can even print your ID and Visa photos from home with this iphone photo printer for 4x6 & 3x3 prints.
Regenerate images safely after changing quality
- Back up originals and confirm recovery. Lossy compression discards information. Do not start a bulk operation until you know where the original uploads are stored and how to restore them.
- Install the filter. Use a site-specific plugin or child theme, and make the change in a staging environment first when possible.
- Create representative test outputs. Include photographs, screenshots, gradients, text-heavy graphics and the registered sizes your theme actually displays.
- Check the files. Compare byte size, fine detail, edges, gradients and faces at normal viewing dimensions.
- Regenerate only after approval. Use your chosen regeneration workflow to recreate thumbnails and other derived sizes. The filter alone will not perform this step.
- Check caches and responsive images. Purge CDN, page and browser caches as appropriate, then verify that pages serve the newly generated sizes.
When a plugin is a better workflow
A PHP filter is precise and lightweight, but it does not by itself provide a Media Library queue, optimization reports, backup controls or bulk processing. A plugin may be preferable when you need those operational features. These listings describe product capabilities; they do not establish a head-to-head quality or speed winner.
| Plugin path | What its listing describes | Important consideration |
|---|---|---|
| ShortPixel Image Optimizer | JPEG optimization, multiple compression modes and optional backup/restore. | The listing says images are sent to ShortPixel’s optimization cloud. Verify backup settings before bulk changes. |
| EWWW Image Optimizer | JPG quality and thumbnail controls, with possible local optimization. | Local processing depends on compatible server tools and configuration. |
| Imagify | JPEG support, Smart Compression and original backup/restore features. | Backup and restore behavior depends on the settings you enable. |
Before selecting a plugin, check whether it processes existing Media Library files, where processing occurs, which formats it supports, how originals are retained, and whether it conflicts with another image editor or optimization plugin. Avoid running two systems that repeatedly recompress the same JPEGs.
WordPress 7.1 client-side processing
WordPress 7.1 documents client-side media processing that honors the same PHP quality filters for registered sizes and browser-based resize or transcode operations. If the server does not provide a quality field, the documented client fallback is 0.82. See the Client-Side Media Processing handbook and the WordPress Core announcement dated July 22, 2026.
This does not mean every upload follows one identical path: the editor backend, registered sizes, output format, explicit quality arguments and other plugins can change which code performs the operation.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutePC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Quick Recap
Troubleshoot an unchanged result
- The file size did not change: confirm that the file was regenerated after the filter was enabled; an old thumbnail may still be displayed.
- Your value appears ignored: look for code that calls
set_quality()with an explicit value, or for another callback running later. - Only some sizes changed: inspect the registered image sizes and the code path that creates each one.
- Quality is unexpectedly low: check for an optimization plugin or CDN that recompresses files after WordPress saves them.
- The browser shows an older image: purge relevant page, browser and CDN caches and verify the generated filename and URL.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

