Yes, there is actually a filter hook to change JPEG compression ratio. You could add these lines to your functions.php
:
add_filter( 'jpeg_quality', 'jpeg_custom_quality' );
function jpeg_custom_quality( $quality ) {
return 70;
}
You may change 70
to whatever value you want.
Related Posts:
- How can you set maximum width for original images?
- WordPress Image Editor not working – conflict?
- Image dimensions same as image size
- Best image hosting service
- Filter what image sizes get generated
- Media > Image Sizes aren’t being applied to uploads
- add_image_size landscape or portrait
- Front end wp_editor not rendering audio/video links
- Force WordPress, themes & plugins into using defined sizes
- WordPress Media Image Manager — Creating Lots and Lots of Odd Sized Images
- Large image size stuck on old value, even for new images
- Rotating image does not work for custom image sizes
- Link to resized media file
- Editing image dimension – to edit the main image file
- Force image crop size in media editor
- Set Maximum Width for an uploaded image
- When inserting an image in a post, how to link the image to a resized URL instead of the full image URL?
- How do I get WordPress to create resizes of a supplied default image in a theme?
- TwentySeventeen $content_width not updated in admin
- Insert Link to Audio versus Embed Audio Player
- How to resize image in wordpress from backend? Seems like bug in wordpress
- Hide download button from audio player
- Only current gallery images with get_attached_media
- Custom image sizes
- Set default image link target in Gutenberg image block
- Custom post type with a forced fixed aspect ratio image crop
- How do I force WordPress to show most recent version of images in the media library?
- Removing default image size list in Media Box
- How to capture the selection:toggle event fired by wp.media
- wp media regenerate unknown –image_size parameter
- Is there a plugin to make attaching images easier?
- How to display all images “Uploaded By” an author
- Shortlink directly to a media file?
- Is it possible to generate JPEG progressive thumbnails?
- Way to display media library in frontend
- Images are registered in media library but still won’t show up
- Add visual editor to Media Edit Screen
- Rest API rename media
- Disable drag and upload in Media Library
- Custom media picker in meta box: how to select available image sizes?
- Add media column to edit post screen
- Moving existing media items to new upload path structure not updating full URL path
- How to bulk Edit Dates in Media Library?
- Rename media files generated during upload
- WordPress Built In Dialog Box For My Plugin
- Get post attachment images dimension and use in embed code
- How Do I Delete All The Images from WordPress
- uploading images to specified directories
- Handling image uploads without thickbox
- How to change image atributes right before an image to be saved?
- Is it possible to change ‘Link to’ in all images in all articles?
- Ho to add “Create Slider” option to default “Add Media” popup?
- How to upload WordPress Images to remote web server and display those images in WordPress gallery [closed]
- What is the alternative to “ when it comes to calling Media (image) files in the ‘attachment.php’ file?
- Images uploaded to the media library has strange colors. However, in the edit screen the color is ok
- Blank upload.php page
- media library not showing thumbnails after deleting full image
- Retrieving Meta from Image Attachment
- Media attachment pages giving 404’s
- Extending wp.media.model, query media from different blog on network and refresh view
- WordPress automatically adds links to uploaded images
- In creating a theme, how can i allow a user to change an image outside post/page content?
- WordPress get_media_embedded
- Theme loosing some images when moving to new server
- Auto delete pictures in media library by age
- Get featured image with custom size outside WordPress
- WordPress creating images if uploaded image is greater than 960px on one side?
- How to get all inline images in post content? [duplicate]
- Convert all uploaded PNG files to PNG-8 format
- formatting horizontal and vertical images in Settings?
- Get all media from wp-json/wp/v2/media
- Access generated thumbnails
- how can I change all wordpress media file url to custom cdn url?
- unable to write to the database while uploading images
- How to display the Media Library Items Upload date
- Upload error on localhost (at minimum, not yet tested online)
- Media Library modal customization
- Get all uploaded images using REST api
- IPTC and custom thumb size
- WordPress REST API to get all media not working
- unsharp thumbnails after uploading image
- Append Media/Attachment IDs to Gallery Shortcode HTML Output
- Post images are not displayed in media library
- Media and all images disappeared from my wordpress site
- Replace Swedish characters in filenames
- Use wget to find used images
- Get the Playlist embedded in Post/Page content
- Import media in bulk with caption and titles?
- Media previews on posts
- wp media popup close all popup
- How do I display image files as links?
- Broken Media Library
- Unable to send upload url
- Is it possible to convert various image types from remote URLs to WebP and then serve them immediately?
- How to import and update images/galleries that point to an old site
- Media Library empty after server migration
- WordPress API, creating Featured Media from image url (nodejs)
- Uploading media to wordpress API with C# HttpClient
- Looking for a way to insert PDF image preview in TinyMCE
- Optimize blog that serves hundred of images and videos