In your functions.php you want to issue a call to set_post_thumbnail_size()
https://codex.wordpress.org/Function_Reference/set_post_thumbnail_size
As with add_image_size, you provide the target width, height & whether you want the image hard cropped to these dimensions. So, for example,
set_post_thumbnail_size(427, 427, true);
will crop all your thumbnails to be a maximum of 427px high or wide, depending on aspect ratio of the original.
If you use
set_post_thumbnail_size(427, 9999);
then your images will be scaled to 427px wide without being cropped.
Related Posts:
- Missing feature image link function
- Removing default image size list in Media Box
- How to reduce original image quality on upload?
- Generating Responsive Background Image Sizes in PHP
- Why are image thumbnails cropped proportionally (not per dimensions)?
- Why are image thumbnails cropped proportionally (not per dimensions)?
- Display height and width properties with the_post_thumbnail() or related function
- Removing the first image in content
- Function to auto-set a featured image that is already in use
- wp_get_attachment_image function size argument not working if I also add a custom class
- Overwriting Parent Theme’s Image Sizes
- Can you put a condition on add_image_size() depending on the width of the uploaded image?
- show first 3 thumbnails of posts in different sizes [closed]
- Can’t generate thumbnail images
- Limit dimensions of “Full” size images
- How to hide image-url if no attachment?
- Can’t locate custom image sizes defined by child theme
- How to add a new image size and apply it to posts only?
- Featured Image keeps cropping
- Custom image sizes showing in Classic Editor only when upladed directly to post
- how can I change all wordpress media file url to custom cdn url?
- Can You Set A Minimum Image Dimension For Resizing Images?
- Featured image on archive page based on post type
- Printing medium sized image
- Zip all (original) images from media gallery
- Full size image option removing problem
- Image width issue in IE [closed]
- image_size with respect to aspect ratios
- add_image_size() parameter four ($crop = true) is ignored: the_post_thumbnail() returns scaled image(s) instead of hard cropped
- is there a way to remove featured image from blog page and single page
- What are the meta fields for an attachment?
- Can set_post_thumbnail be used to remove a thumbnail?
- Woocommerce image sizes missing from Appearance › Customize but not declared by theme
- How to properly set custom logo size?
- Add attribute only to first image of every post via functions.php
- Need To Change WordPress Meta Tags… Includes wordpress shortcodes
- Need to convert image url to a Base_64 data url with wordpress function..
- How to Add Shortcode to html img code?
- Get featured image with custom size outside WordPress
- Is it possible to enable the ‘Link To’ field under ‘Attachment Display Settings’ for a Featured Image?
- Else/If Statement to Display Photo Descriptions
- Function to insert missing image size attributes into img tags
- Image Crop Not Working
- Use existing image sizes for WooCommerce
- Problem in using Customizer
- Set Featured Image not opening – Stuck at loading
- wp_get_attachment_image_src returns image on main domain, false on subdomain
- WordPress not creating “large” thumbnails
- Retrieve First Image Function
- Show Featured Image in else statement
- Custom Image Size in Insert Media
- Change custom featured image size in twentythirteen child theme
- resizing of thumbnails not working
- Prevent creating multiple image resizes in twentytwelve template
- Conditional function for excluding first image from content, not working
- Convert all uploaded PNG files to PNG-8 format
- Add_image_size not generating correct size
- Using add_image_size in functions.php to get original uploaded file
- get_image_tag() html output : empty src attribute
- How to make excerpt image be full size instead of thumbnail?
- show all the posts thumbnails
- struggling with syntax for the_post_thumbnail();
- include w_thumbnail_src in function?
- Facebook OpenGraph error, Call to undefined function wp_get_attachment_src()
- Need To Resize Images Exactly Without Losing Image Details
- Different image using srcset function
- Is it possible to limit number of files a non-admin user can upload via the WordPress media library?
- Auto delete content in specific folder inside media library
- How to change images url in function.php?
- Which filter fires upon setting a featured image
- not outputting medium size image URL
- Put images in the media from url functions
- How to add HTML into error message
- How to update an image attachment’s alt text from a custom field when saving a post?
- Can I use ‘Featured Image’ as a hero image and a thumbnail?
- Class parameter in get_avatar args doesn’t get added to output
- large image size of 1440×1440 not pulling 2x of 2880×2880 image
- remove_filter function to unhook twentysixteen parent theme function
- blank page with wp_get_attachment
- (Divi): How to make WordPress load images of specific size for Blurb modules on given page with a funciton?
- Images with overlay
- Sticky – Featured Image
- restrict uploaded image size and fixed image display size
- Why am I losing image quality on my site?
- Replace image attributes for lazyload plugin on image elements with specific class
- Function image_send_to_editor returns emty title tag
- Using Switch Statement to Change Image According to Last Digit of Topic ID
- Frontend Feature image upload not work
- Disable links to images only if link is an image
- Restricted images only for logged user. (hidden url)
- Best way to add image to recent posts widget?
- Slider Thumbnail Size Issue [closed]
- No compression occurs on my jpegs after adding jpeg_quality hook to my functions.php file
- Newly uploaded images are not updating in featured image
- Remove Featured Images from Posts Older Than a Certain Date
- Different body image backgrounds on different pages, posts and categories
- Update add_image_size
- Function the_content
- Apply height and width for the_content() inside youtube video tag
- Open image size links in a page instead of direct image link