If the critical dimension is height, you have a couple options:
Hard-cropping to the exact width/height:
<?php
add_image_size( 'wide-image-icon', 200, 150, true );
?>
The hard-crop will create a thumbnail size using the exact dimensions. Be sure that all images have a minimum width/height as what is defined.
Or soft-cropping (i.e. “box-resizing”) constrained to height:
<?php
add_image_size( 'wide-image-icon', 9999, 150, false );
?>
The soft-crop with an unconstrained dimension (i.e. 9999
width) will box-resize to the exact height, while allowing the width to be, essentially, anything. Be sure that all images have a minimum height as what is defined.
Also: make sure that, if you have added these add_image_size()
functions after already uploading/attaching some images, that you regenerate your thumbnails.
Related Posts:
- How to disable WordPress from creating thumbnails?
- How to Dynamically Resize WordPress Image On-The-Fly (custom field/theme option)
- Display thumbnail only if requested size exists
- Display Category Thumbnail and links in Woo commerce
- media_sideload_image generates blank?
- Post thumbnail outside the loop
- How do I add the featured image to the_content after the first paragraph?
- Showing a placeholder/default img, if no featured image is set
- Re-order media links?
- How to show featured image CAPTION only if it exist
- Add Image Dimensions to Media Library Tab on Media Upoader
- Change Output for Images in Content
- Featured image for news page
- Fallback default image when there is no featured image
- previous / next post with thumbnail
- Adding schema itemprop image to the_post_thumbnail with filters
- How to get custom image sizes into media uploader dropdown?
- wordpress responsive image srcset not working
- How do I get a random image from subset of images in media gallery?
- Why are extra 92 pixel square thumbnails created?
- wp-cli regenerate media is not working for custom sizes
- Remove dimensions from filename featured image
- PDF Image in content
- Replicate featured image functionality
- Why does the Hard Crop option Scale?
- Post Thumbnails multiple sizes
- Long Post Title Misaligning Grid with Featured Image
- How to add multiple featured images to post/page without a plugin
- How do I set “Upload Image” as detault “Set Featured Image” window?
- Featured Image won’t display on Posts page
- Get post thumbnail from subpages with a foreach loop
- Getting images to show up in RSS Reader
- how i can increase Featured thumbnails size?
- How to automatically resize animated GIFs used as Featured Images, without losing animation?
- How to get cropped thumbnail source for custom post type
- Exclude featured image from attachment loop
- Using thumbnail functions inside a shortcode
- Featured image for first post only
- Featured Image Not Working when loaded from sub-domain
- How to write conditional for custom checkbox in featured image meta box
- How can I use a static (ish) URL for the featured image for a post?
- get_the_post_thumbnail ignores my default thumbnail size [closed]
- How To Add and Display Category Image
- Remove the link to a featured image if and only if it’s not a gif
- How to query posts with featured images
- hrecipe microformat tag to “featured image”
- Server B handling add_image_size() differently than Server A
- the_title() is not displaying over the_thumbnail
- Wanting to change presentation from full post to featured image (post_thumbnail) only
- Show posts image attachments
- Choose to Display Post Thumbnail?
- How do I make images appear in the beside blog post summaries?
- Featured Image meta box shows at the bottom?
- Thumbnail is showing outside its div instead of inside it
- How can I assign bloginfo path or thumbnail path to a variable and call it in markup?
- How to get featured image thumbnail to open larger version in attachment page?
- How To Use YouTube Url Stored In Custom Field To Get Video Image and Set it As Featured Image
- Display post thumbnail in foreach loop
- Add image size array to a portfolio thumbnail in combination with Masonry Jquery Plugin
- Define width of featured image thumbnails, but also make responsive?
- Add title to image post
- How to attach images that I “insert from url” into the post?
- If no featured image, add one of the default images into DB
- the_post_thumbnail(‘medium’) still gives thumbnail-size img
- My Gallery Photos are showing in the post’s excerpts
- the_post_thumbnail not resizing
- How to add featured images to posts from a category
- How do you code a featured image into an XML as a jpg link, instead of using a data-id number?
- Thumbnail (featured image) and Media Library cleanup queries help needed
- Change featured image when changing viewport
- Adding guiding text to the ‘Featured Image’-box in the backend
- Thumbnails are hard cropped not matter what
- Thumbnails regenerate wp_generate_attachment_metadata
- Using the_post_thumbnail do not rollback to original image if specified thumbnail does not exist
- Get author image from corresponding article in thumbnail
- Missing image size
- water mark on featured post image in wordpress
- Making a ‘featured image’ become the image for a full banner (top of page) image in a blog post?
- How to change text of Remove featured image
- Add space under featured image in singel post
- How to undo thumbnail regenration
- Genereate widescreen featured images in different sizes
- set_post_thumbnail() shows Unattached on backend under Media
- How to get the URL of a each custom image size of a featured image
- Recent posts show thumbnail
- Add Featured Image from Existing wp-content folder
- Featured Images missing on migrated site
- Trouble Retrieving Thumbnail URL on Front-Page
- Pointing Existing featured images to s3 bucket
- Displaying All Parent Pages as Featured Images
- Featured Images not appearing
- Editing featured image
- trouble with the_post_thumbnail
- WordPress save thumbnail but don’t show it [closed]
- Get all images from posts with maximum number and without featured image
- Display featured image as post thumbnail
- Scan for first image in post and display it [duplicate]
- Change featured thumbnail based on screen size
- Show a featured image with “Link” Post Type?
- How to display featured image caption only if exists?