I put the following code into my functions.php
file. It works!
add_filter( 'wp_image_editors', 'change_graphic_lib' );
function change_graphic_lib($array) {
return array( 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' );
}
When this helps it is because it changes the PHP code module used for processing the uploaded image for use with WordPress.
This processing includes moving the image into the media library database and generating the different size images (“thumbnail”, “medium”, “large”) that WordPress always wants available for themes to access.
It causes the “GD” module to be used, because it is first. In some server setups, the newer “Imagick” library isn’t playing well with others for certain image scenarios, such as large pixel dimensions, so forcing the “GD” library to be used is a fix.
Related Posts:
- media_sideload_image generates blank?
- Password protect some uploaded files, so only logged-in users can view them
- Need clear explanation about medias/files/attchments
- How to retrieve alt attribute for an attachment (uploaded image)?
- Image still attached to post even after removing it as featured image
- How to bring files from the upload directory to the media gallery?
- Get images attached to a specific page
- After migrating media library is not showing thumbnails
- Adding attachment custom field metadata to TinyMCE tag
- controlling whether upload is attached to post or not
- Close featured image modal windows with JS
- How to Protect Uploads, if User is not Logged In?
- WordPress 3.5: Setting custom “full URL path to files” in the Media Library?
- Upload images to remote server
- Delete original image – keep thumbnail?
- Uploaded images don’t show in Media Library if there are special characters in IPTC Keywords
- Can I use the wp media uploader for my own plugin?
- How to wp_upload_bits() to a sub-folder?
- “Add Media” only shows “Full Size” under Attachment Display Settings
- Differentiate Featured Image from Post Images upon Upload
- Where do the favicons for Media Files come from
- media_handle_upload for local files?
- Uploading Multiple Attachments From Front-End With A Description
- Is it possible to trigger some JavaScript when Media Popup is opened?
- How to call WP3.5 Media Library manager?
- How to crop thumbnail height to auto with set width
- Creating a metabox to upload multiple images, Ignoring The Featured Image
- Get all posts (of any post type) an attachment is used in
- Image uploader with “Set Featured Image” link on front end
- Ignore a filter on the media library
- Restricting access to files within a specific folder [duplicate]
- Set (featured) thumbnail for post?
- How to upload imagick resource to media in wordpress
- Media items hogging pretty permalinks
- Custom post type thumbnail / Media Library WP_DEBUG notice [closed]
- WordPress media upload “HTTP error”
- Delete all thumbnails for a post
- why when I try to insert an image attachment along with a post does wp_get_attachment_url give me a very wrong file path?
- Restrict file types in the uploader of a wp.media frame
- Adding File Extensions to Attachment Page Permalinks
- How to import 55k images (uploaded via FTP) into WordPress Media libary? [closed]
- Different upload path per file type
- Hide upload image fields for the different media upload popups
- How do i show wordpress attachments from current post?
- is it possible to force wordpress to always save thumbnails as ‘jpg’ not ‘png’
- How do I get allowed Media Library upload file extension list?
- Images not being generated at correct size
- Audio file’s length (duration) is missing from Attachment Details in Media Library [closed]
- Force documents to appear in Featured Image dialogue
- How to replicate Media Library “Add New” on Plugin Settings Page
- Attach media to multiple posts
- Switch between tabs on “Insert Media” dialog
- Use the WP media uploader dialog for uploading a form attachment (non-admin). Offering progress and drag and drop feedback
- Exclude featured image from attachment loop
- Cannot upload anything via wordpress
- How do I modify the “Insert Media” lightbox in the admin to only show media items from a category?
- Display attachments by the ID of the post being edited in the wp.media frame (frontend)
- Media Gallery Upload photo incorrect way like glitch
- WordPress Issue : The uploaded file could not be moved to wp-content/uploads/
- WordPress media uploader – upload tabs not hiding
- problem in uploading attachment to custom directory
- Too slow Image upload in WordPress Media Library as image number increases
- upload_max_filesize is set to 64 MB already but WordPress is still showing 2 MB
- PHP error when trying to upload .mp3 files via Media Library [closed]
- How does WordPress decides how many sizes of an image to create?
- Is there a way in WordPress to convert images to WebP without a plugin?
- Images uploaded on frontend display correctly but not in media editor.
- Open Media Uploader Link in single post or page
- Remove Media File Items From Server That Do Not Exist in Media Library
- WordPress not creating “large” thumbnails
- Cropping thumbnails to specific dimensions on front end post
- Insert attachments from custom uploader into post (regular uploader style)
- Moved server, and WP now uses original images for all thumb sizes?
- Upload image through URL?
- Using WP-CLI “wp media import” to sync files to the media library
- Efficient way to move media folder to another folder
- WordPress append -1 to the image name
- Make inline uploader (plupload) on options page upload to a specific folder
- How can i set media attachments to the author of the post or page for already existed posts with attachments
- Thumbnail (featured image) and Media Library cleanup queries help needed
- How to add HTML into error message
- replace featured image from frontend
- Replicate Media Galley Edit view in Add Media View
- Set featured image from auto generated video thumbnail url php
- Front-End Upload media with category
- How to manually set an attachment in a post?
- What is wrong with my wp_insert_attachment code?
- Handle image file and save it to media
- Organising and display thousands of photos in media library
- Check if author or uploader id of the attachment(uploaded) image is match?
- Limit attachment caption characters
- Organizing the Media Library for Cleanup
- Insert media while posting is not working with new wordpress update
- Edit Image/Image Details – Replace button missing
- Media Library is not loading on grid view in admin panel
- How to modify Media Library images DPI [ image quality down to make small in size ] [closed]
- Blurry Images WordPress 5.8.1
- Save Custom Meta Value on Media Upload
- How can I use an image from an external source without uploading it to the media library
- What is the proper use of guid for images in wp_posts?