From purely WordPress point of view you want add_image_size()
with a “hard” crop mode. That will ensure that any significantly large image will be sized to fit into those dimensions exactly, cropping some parts if necessary.
The problem is usually that WP won’t upsize small images to fit, as far as I remember. It is most definitely possible to implement custom sizing logic, but it’s not something straightforward really.
In my opinion hard crop size is reasonable low hanging solution here. Anything that it can’t handle probably requires human attention for decent result anyway.
Related Posts:
- How to generate thumbnails when needed only?
- No Thumbnails Generated
- How to Require a Minimum Image Dimension for Uploading?
- How does WP media uploader create the 3 different sized images, and how can I duplicate it
- Reject upload of wrong-sized images using the Media Uploader
- Create image formats with different qualities when uploading
- Which filters or actions to use after a media upload and delete?
- PNG with transparent background turns black when uploaded and resized
- Settings in ‘Media > Settings’ is ignored when inserting images
- There’s a way to scale media (images) at 50%?
- How to prevent upload of a multiple sizes of images
- How can I prevent uploading bmp image?
- Impose a Maximum Limit on Image height and width upload size
- Force wordpress to see uploads folder media
- Convert uploaded PNG to JPEG automatically
- add_image_size creating lots of images (of various sizes)
- resize images not crop
- Add suffix to filename of uploaded images
- How to link to the image editor’s Edit Image function?
- Regenerate thumbnails after upload
- Front-end Image Upload with Preview – Is this Possible in WP?
- WordPress won’t generate image sizes for certain images
- Thumbnails produce unwanted gray pixels on white background [closed]
- Site icons with alpha channel for self-hosted WordPress blog network
- How can I receive the image id using the media box?
- Can I stop wordpress generating media sizes
- add_image_size() and uploading the exact size leaves 1×1 image in uploads
- WordPress Fancybox Resize Large Image
- Error uploading images (but the images are at the server!)
- How to generate thumbnails when needed only?
- WordPress Media Library showing wrong preview size?
- add_image_size adds size, but doesn’t upload if source resolution is same as resize resolution
- Original image not saving?
- Process uploads with phpThumb before generating thumbnails
- Resize existing library images
- Large image upload size (using timthumb.php
- Image resizing – TimThumb vs convert on upload?
- WordPress Bug on IIS ? Problem when uploading image on IIS 7
- When does WP resize an image file
- Stop image resizing in particular case – is that possible?
- Issue with images which have no sizes available
- How to resize attachement
- Best way to receive special images in posts
- Dynamically determine the width and height of a image file to be cropped & uploaded AFTER form submission given fixed aspect ratio
- Control resizing of uploaded images
- Images uploaded via Gutenberg image block are cropped
- Set default “Link CSS Class” in add media admin editor
- Images not aligning correctly
- Redimension thumbnail crop without creating new images
- get the post thumbnail returns the full size
- WordPress Image Resize fails without Error Message
- How to force attachment size for every post
- what happens to existing media files when I switch to year/month directory structure format?
- Image upload callback in new 3.5 media
- What might cause a POST to wp-admin/async-upload.php to return JSON >and< HTML?
- Saving the pre-sanitized filename of an attachment as the Title or Caption
- Alter media caption/description conflict in WordPress?
- Debugging upload problem: What part of WP does actual image-resizing?
- How wordpress handle upload images and how to use them in the code
- Rename attachments during upload
- Where is Featured Image code stored in WP?
- Insert into Post button is missing for certain images
- Prevent renaming of uploaded media
- How to order images in a post in WordPress 3.3?
- Allow only attachment uploaded to current post
- Multiple images with Media Uploader on front-end
- WordPress automatically downscaled images larger that original
- upload_mimes not accepting CSV
- Receiving 404 when uploading file larger than 10kb
- Show image crop window on image upload
- Is it safe to allow non-admin users access to media uploader
- frontend image post uploader
- Upload multiple images and insert them into custom html code
- Set Maximum Width for an uploaded image
- Uploaded images not displaying in network site
- WordPress function when file is uploaded, deleted or edited
- How to limit the number of images displayed in the media window?
- How to upload media to specific year/month folder
- Get images attached to a specific page
- Right way to download file from source to destination
- Disable image rename on upload
- HTTP error when uploading an image
- Embed HTML5 files/subfolders in post?
- image URL changed in wordpress
- Import media (.xml) does not attribute featured images to posts
- Recreate the upload folder from a website without having access to the backend/cpanel/filezilla directly from the website
- Modify Maximum upload file size text in WordPress Media
- Updated wordpress missing image upload area
- Replicate Media Galley Edit view in Add Media View
- File upload in WordPress
- How to change default upload dir?
- How could you allow users to upload a video in within their profile and display it on a wordpress site?
- 45mb File Exceeds the Maximum Execution Time
- How to share media between independent blogs?
- WP Capabilities to Add Media, Use Media, But Not Edit Them
- Limit attachment caption characters
- WAMP install acts different than live install when uploading images
- What is the best way to upload a temporary & sensitive file and then delete it when done
- Do I need FTP set up to upload files to wordpress server
- Media Gallery doesn’t show (using WP-Read Only)