This could be a dumb idea, but what if you set it to
add_image_size('gallery-image', 9999, 600);
As long as you don’t add ‘true’ it won’t crop, it scales to fit into the space by default. It would then try to fit into the smaller of the two, the height in this case, and scale down appropriately. Or you could do the width as the constraint and make the height the ridiculously large one.
Related Posts:
- Missing feature image link function
- 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]
- Set spesific size of featured images
- Can’t generate thumbnail images
- How to hide image-url if no attachment?
- 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
- Featured image on archive page based on post type
- Printing medium sized image
- Full size image option removing problem
- Image width issue in IE [closed]
- image_size with respect to aspect ratios
- How do I change/modify the_post_thumbnail(); html output?
- How to change the markup WordPress inserts for post images
- Programmatically Set First Image as Featured
- Automatically set the featured image
- WP 4.4. responsive loads normal image after loading the responsive image
- How to add classes to images based on their categories?
- How to reduce original image quality on upload?
- Add options to featured image
- Set image size on media and text block with a function
- Create thumbnail on PDF upload with Gravity Forms
- Remove images from get_the_excerpt
- Use Exact Image Size using add_image_size
- Make WordPress size and name images for Retina.js
- the_post_thumbnail fallback using hooks
- Insert width & height attributes to all images displayed on each page
- Custom image size in Media Dropdown
- Actions according to image type and size
- Woocommerce Storefront WordPress Ignore Media Gallery Images and use External 3rd Party Host
- Overwrite Parent Theme add_image_size in Child Theme
- Images uploaded using media uploader are appearing upside down
- How to add css class to image attached in all the posts?
- Add custom image size not working
- Get the 5 lastest Featured Posts from a category
- how to add an image to the footer?
- Change size and crop medium_large images
- Getting Featured Image Caption to Only Show if Populated
- Can’t check if a post has thumbnail adding filter to get_post_metadata()
- Post thumbnail not showing in WP admin area for custom post type
- Understanding and altering the structure of posted images
- Set the background to a default image if there isn’t a specified “featured image”
- Backstretch.js and thumbnail sizes to reduce loading time
- set_post_thumbnail when user is not logged in
- Publish/Update post is changing image links from file url to post url
- Featured Image Thumbnail Creation
- How to stop twenty fifteen theme from cropping featured images?
- Display images that are not in the content
- Remove after images
- Getting custom image size URL in functions
- Redirect to another page using contact form 7? [closed]
- Control the srcset much more (not all sizes in it each time)
- is there a way to remove featured image from blog page and single page
- What are the meta fields for an attachment?
- Can’t locate custom image sizes defined by child theme
- How to properly set custom logo size?
- Add attribute only to first image of every post via functions.php
- How to Add Shortcode to html img code?
- 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
- wp_get_attachment_image_src returns image on main domain, false on subdomain
- Retrieve First Image Function
- Show Featured Image in else statement
- Prevent creating multiple image resizes in twentytwelve template
- Conditional function for excluding first image from content, not working
- Add_image_size not generating correct size
- struggling with syntax for the_post_thumbnail();
- 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
- not outputting medium size image URL
- How to update an image attachment’s alt text from a custom field when saving a post?
- large image size of 1440×1440 not pulling 2x of 2880×2880 image
- 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?
- restrict uploaded image size and fixed image display size
- Using Switch Statement to Change Image According to Last Digit of Topic ID
- 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]
- Different body image backgrounds on different pages, posts and categories
- Apply height and width for the_content() inside youtube video tag
- Open image size links in a page instead of direct image link
- add_theme_support not outputting thumbnails
- Function to get thumbnail img source
- Remove default Image Sizes