wp_get_additional_image_sizes retuning true if image is smaller
-
I’m confused with the functions wp_get_additional_image_sizes and has_image_size as they both return an array or true even if the fullsize image is smaller than this thumbsize.
For example:
I have an image which is 196x196px
My results listing requires a thumb of 260x260px, so I call has_image_size for the custom listing_thumb-260 thumb size. It returns true.
If you var_dump( wp_get_additional_image_sizes()[‘listing_thumb-260’]) it returns:
array (size=3)
‘width’ => int 260
‘height’ => int 260
‘crop’ => boolean true
But this isn’t true the image is only 196px.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘wp_get_additional_image_sizes retuning true if image is smaller’ is closed to new replies.