Summery Summery

Let plugins pre-filter the image meta to be able to fix inconsistencies in the stored data.

Syntax Syntax

apply_filters( 'wp_calculate_image_srcset_meta', array $image_meta, int[] $size_array, string $image_src, int $attachment_id )

Parameters Parameters


(array) The image meta data as returned by 'wp_get_attachment_metadata()'.


(int[]) An array of requested width and height values.

  • (int) The width in pixels.
  • '1'
    (int) The height in pixels.


(string) The 'src' of the image.


(int) The image attachment ID or 0 if not supplied.

Source Source

File: wp-includes/media.php


Changelog Changelog

Version Description
4.5.0 Introduced.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

What are you looking for?