Actually WordPress reduce quality of image when you upload it via media uploader. WordPress has built in compression for JPG images. Whenever you upload an JPG/JPEG image to WordPress media library, WordPress will automatically compress your images to 90% of the original quality, this is intended to help your pages load faster and keep file sizes smaller.
You can disable image compression and force WordPress to keep maximum quality images with this function.
// Set image quality
function my_image_quality( $quality ) {
return 100;
}
add_filter( 'jpeg_quality', 'my_image_quality' );
add_filter( 'wp_editor_set_quality', 'my_image_quality' );
Related Posts:
- Image Upload from URL
- Upload images to remote server
- Each custom image size in custom upload directory?
- How to delete resized (cropped) image uploads and prevent future resizing?
- Download an image from a webpage to the default uploads folder
- After Moving a Site to Another Domain, All Images Are Lost
- Uploaded images don’t show in Media Library if there are special characters in IPTC Keywords
- Allow contributor role to upload images and not edit already published articles
- Is there a hook which fires after all thumbnails are generated?
- Limit image resolution on upload
- Rename files on upload
- How to insert images into posts without using Add Media dialog
- Using Images in WordPress – Best Practices
- Media Upload Folder – how to manage
- Prevent large image uploads
- Modifying an uploaded image with ‘wp_get_image_editor’ and ‘wp_handle_upload_prefilter’
- Upload multiple images in a custom metabox
- hook into completed image upload filter
- Saving the pre-sanitized filename of an attachment as the Title or Caption
- Prevent image upload unless exact size
- getting uploaded SVG dimensions on front-end
- Adding upload button in metabox
- Use Media upload in custom widget on wordpress 3.5
- Automating a Daily Picture Blog?
- How to copy and paste a picture found on the web to wordpress easily
- Images uploading to wrong folder
- Get attachment ID of author_meta image – Attachment Metadata
- Replace all of post’s image URLs with upload directory URLs
- How can I add the “Use as featured image” to a custom metabox?
- Image resize with image url
- How can you upload an image from within a settings page?
- How do i upload an image and return the image id?
- Alter media caption/description conflict in WordPress?
- Restrict the number of images to upload per post
- WordPress function: limit size, only jpg, jpeg, limit of uploaded files per account
- How to increase media image scale limit?
- Frontend image uploading from edit profile page. (goldenapples)
- How to upload image without post ID using the new media uploader?
- How to Display an Image Uploaded through a Meta Box in a Template?
- HTTP Error when trying to upload image
- Rename attachments during upload
- Filter to modify post_title after image upload?
- Uploading an image as featured image from frontend form
- How to upload images from my directory into my wordpress?
- could not upload image in media library
- Automatically Add Caption in image
- Uploading images to Media Library fails with Memory Exhausted
- Edit image preview is not displayed
- How to add a media with PHP
- When Uploading JPEGs, Does WordPress Compress the Original Image?
- Rename image during upload using date and time stamp?
- Uploading images: ‘ø’ get replaced with ‘ø’
- How to disable the suffix “-scaled” which is being added at the end of each uploaded image?
- SSL: How to make customizer images Protocol Relative in WordPress?
- Insert image in comment reply
- How to set a Minimum Image Dimension for Uploading
- What’s the best “insert all images” plugin?
- Is 700,00 jpgs too many for a WordPress site.?
- Different upload path per file type
- Animated Gif image not uploading correctly
- Images in upload folder with hexadecimal names
- Frontend Post – Allow Only Image File Upload
- Restrict Image Uploads to a Certain File Type
- Rename media files generated during upload
- add_image_size() to crop images into squares?
- HTML tags in WordPress image caption
- HTTP Error when uploading files above 7mb unless using GD Image Editor
- wordpress media library shows empty images
- media_sideload_image with rewritten urls?
- Upload .doc to blog
- How to order images in a post in WordPress 3.3?
- Is there a plugin or simple way to add a multiple images metabox to a post?
- How to remove Geo Tagging on image uploads, but not other EXIF data?
- How can I upload an image for background use using the Theme Editor in WordPress?
- media sideload image and Google Content
- How to set a contact forms total size limit
- Generating different dimension images while uploading image file from custom plugin page
- Change WordPress Media Manager
- All Images on wordpress site broken
- Show media url immediately after upload in media uploader
- Multiple images with Media Uploader on front-end
- Can’t seem to attach uploaded image to post and set it as thumbnail
- Bulk edit of EXIF data for jpeg images uploaded in the media library?
- How to keep WP from recompressing Full Size images
- Faster way to put images into a blog post by using Add Media dialog
- image in my post disappeared after I upload website to remote server
- Handling image uploads without thickbox
- Image upload appearing as broken images following server move
- Migration to WP – Couldn’t load image
- How can I create more upload paths, like a post corresponding to a post title folder used to store images of the same product
- Get image URL after image created from canvas and sent to WP uploads with AJAX
- Alter the image, before save, of a particular image size
- WordPress automatically downscaled images larger that original
- Disable all resizing and compression
- Loose images in uploads folder
- How to stop thumbnail generation from some images and different size thumbnail generate
- Force minimum image size and aspect ratio when uploading images
- having issue while uploading An error occured in the upload. Please try again later
- Missing a temporary folder.error when image is uploaded in admin Set temporary Directory – WordPress 5.2.2
- WP fails to upload files to media library, /wp-admin/async-upload.php 403 forbidden