apply_filters( 'wp_calculate_image_sizes', string $sizes, array|string $size, string|null $image_src, array|null $image_meta, int $attachment_id )

Filters the output of ‘wp_calculate_image_sizes()’.


Description Description


Parameters Parameters

$sizes

(string) A source size value for use in a 'sizes' attribute.

$size

(array|string) Requested size. Image size or array of width and height values in pixels (in that order).

$image_src

(string|null) The URL to the image file or null.

$image_meta

(array|null) The image meta data as returned by wp_get_attachment_metadata() or null.

$attachment_id

(int) Image attachment ID of the original image or 0.


Top ↑

Source Source

File: wp-includes/media.php

View on Trac


Top ↑

Changelog Changelog

Changelog
Version Description
4.4.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.