$image_attributes = wp_get_attachment_image_src( $attachment_id, $size );
Returns an array containing:
[0] => url
[1] => width
[2] => height
[3] => boolean: true if $url is a re-sized image, false if it is the original.
Even though you pass the $size as parameter, while returning; it returns the actual width and height of the image irrespective of the image being cropped or not. Then you can check for the width and height if these are smaller then the requirement. OR better apply min-width, min-height in CSS or jQuery.
Related Posts:
- How To Delete Desired Image Sizes From wp-content/uploads?
- Thumbnails of same size with different crop
- image_resize in wp3.5 change to wp_get_image_editor and wont work
- Why is wp_get_attachment_image_src returning wrong dimensions? [duplicate]
- Stop wordpress from creating multiple size images
- wp_get_attachment_image() not working when trying to add width and height attributes
- WordPress 3.5 – Add custom image size
- Add_image_size not cropping
- Custom image sizes only for thumbnails
- Use ‘medium’ size with catch_that_image() function
- How can I get I get the thumbnail custom size dimensions?
- Is there a way to avoid using add_image_size? Best way to manage images
- How to fit image to Thumbnail canvas size?
- Custom image size mixes width and height in output
- Image Sizes/Thumbnails not generating on local install Ampps
- Best way to manage theme images
- add_image_size cropping changes on Mobile devices
- Thumbnails resized and not cropped in the center
- get_intermediate_image_sizes() returning different values depending on is_admin()
- Media Library Image Sizes in Bones theme (add_image_size)
- How to disable WordPress from creating thumbnails?
- set_post_thumbnail_size vs add_image_size
- New image size version only for the Featured Image file
- Is there a hook which fires after all thumbnails are generated?
- How can I upload video, generate thumbnail and convert to different formats?
- How to Delete All regenerated thumbnails but keep the original ones?
- How to Replace YouTube Videos with a “Click to Play” Thumbnail?
- Cropped featured image replaces original image in gallery
- Settings in ‘Media > Settings’ is ignored when inserting images
- How do I delete all generated images from my server except those currently used in posts
- Using Advanced Custom Fields with WordPress and Lightbox
- Can WordPress crop only the post thumbnails?
- WordPress remove EXIF Data from specific Thumb
- Store thumbnails and uploads in different directories?
- Getting specific image thumbnail urls of attached images
- Cannot access the thumbnails of attachment images… Cannot find the reason
- Thumbnail is corrupt but image is good
- Thumbnails are not cropped even after selecting “Crop thumbnail to exact dimensions”
- Removing Title Tag from Thumbnails
- How to make programmatic image upload generate thumbnail and sizes?
- Display latest 12 images from media library
- Lazyload post thumbnails
- Customize WooCommerce Product Images (Placement and size) [closed]
- Show featured image next to post-teasers in Genesis Framework?
- Show full image thumbnail
- hover image appears below placeholder instead of overlayed
- Get thumbnail url of custom meta image?
- If I Regenerate Thumbnails, would WordPress delete the existing Thumbnails and replace them with ‘new copies’?
- How to move image thumbnails into custom folder for custom post type
- ‘Thumbnail’ and ‘Medium’ Image sizes are different than expected
- How to get cropped thumbnail source for custom post type
- Update old Post image metadata to ‘thumbnail’ wp_attached_file
- How to stop wordpress always displaying full-res images
- Thumbnail position + size
- Change thumbnail image depending product category
- Fixing image names for a site being restored
- force feed readers to pick atom version
- How to create resized versions of images added with wp_insert_attachment
- Force image crop size in media editor
- Is it possible to change image size used for preview thumnail in Add Media popup
- Regenerate thumbnails for images that are not in the media library
- How can i make this in the_post_thumbnail?
- Dynamic image crop in WP 3.0+?
- Post Gallery list attachments except the one used as post thumbnail
- Why WordPress suddenly changed sizes of thumbnails?
- Rebuild thumbnails via WP Cli – how?
- Can we use featured image as third party website image URL
- add_image_size not working
- Product Images Low Quality After Updating From WP 3.5 to 4 [closed]
- How to Make Thumbnail of Post Stay Animated
- adding image to post thumbnail from another server
- Disabling image thumbnails and automatic regeneration
- Stop ‘alt’ from being added to the_post_thumbnail
- how to change format jpg to webp?
- Images not showing after wordpres update 5.6
- how to regenerate webp et-pb-portfolio-image
- How to use default image as featured image by implement some code in function.php
- Auto Generate Thumbnail
- Can’t add thumbnail theme support
- unsharp thumbnails after uploading image
- ADD class to all my images (thumbail)
- When upload a PNG a noise appears in the thumbnails
- I cannot upload images to post or the media library in wordpress
- How to reduce unnecessary thumbnail creation?
- Blank image thumbnails in media library
- How to disable post-thumbnail from generation?
- how to place ELSE on if function on multipostthumbnails? [closed]
- resizes images on the fly
- How Do I Auto Generate Thumbnail from First Embedded Image?
- Generate thumbnails like 500px.com
- Serving resized images on a responsive site without making 2x copies
- Trouble Retrieving Thumbnail URL on Front-Page
- Can’t edit thumbnails
- Add custom version to an image
- How can I server scaled images?
- Thumbnail size keeps resetting automatically
- Delete all thumbnails & regenerate them?
- How to crop thumbnail size, from both width and height sides
- Media Library shows default image instead of image preview
- WordPress pointing animated GIF images with wrong file name upon upload (GIFs animation not working)