wp_image_src_get_dimensions


wp_image_src_get_dimensions ( $image_src, $image_meta )

Parameters:
  • (string) image_src The image source file.
  • (array) image_meta The image meta data as returned by 'wp_get_attachment_metadata()'.
Returns:
  • (array|bool) Array with first element being the width and second element being the height, or false if dimensions cannot be determined.
Defined at:

Description

Determines an image's width and height dimensions based on the source file.

Related Functions

image_resize_dimensions, wp_shrink_dimensions, wp_image_add_srcset_and_sizes, wp_constrain_dimensions, wp_expand_dimensions

Top Google Results

User discussions

wpseek mobile