wp_image_file_matches_image_meta


wp_image_file_matches_image_meta ( $image_location, $image_meta, $attachment_id = 0 )

Parameters:
  • (string) image_location The full path or URI to the image file.
  • (array) image_meta The attachment meta data as returned by 'wp_get_attachment_metadata()'.
  • (int) attachment_id Optional. The image attachment ID. Default 0.
Returns:
  • (bool) Whether the image meta is for this image file.
Defined at:

Description

Determines if the image meta data is for the image source file.The image meta data is retrieved by attachment post ID. In some cases the post IDs may change. For example when the website is exported and imported at another website. Then the attachment post IDs that are in post_content for the exported website may not match the same attachments at the new website.

Related Functions

wp_image_matches_ratio, wp_get_image_mime, _wp_get_image_size_from_meta, wp_get_attachment_metadata, wp_read_image_metadata

Top Google Results

User discussions

wpseek mobile