wp_image_src_get_dimensions
wp_image_src_get_dimensions ( $image_src, $image_meta, $attachment_id = 0 )
Parameters:- (string) image_src The image source file.
- (array) image_meta The image meta data as returned by 'wp_get_attachment_metadata()'.
- (int) attachment_id Optional. The image attachment ID. Default 0.
Returns:- (array|false) Array with first element being the width and second element being the height, or false if dimensions cannot be determined.
Defined at: - Introduced in WordPress: 5.5.0
- Deprecated in WordPress: —
Description
Determines an image's width and height dimensions based on the source file.