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

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


Parameters

$image_meta

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

$size_array

(array) Array of width and height values in pixels (in that order).

$image_src

(string) The 'src' of the image.

$attachment_id

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


Source

File: wp-includes/media.php

View on GitHub



Changelog

Changelog
Version Description
WP-4.5.0 Introduced.