wp_get_missing_image_subsizes WordPress Filter Hook

The wp_get_missing_image_subsizes WordPress hook is a great way to ensure that your images are always the correct size. This hook allows you to specify the width and height of an image, and WordPress will automatically generate the corresponding image sizes. This is especially useful for responsive design, where the width and height of an image may change depending on the device.

apply_filters( 'wp_get_missing_image_subsizes', array[] $missing_sizes, array $image_meta, int $attachment_id ) #

Filters the array of missing image sub-sizes for an uploaded image.


Parameters

$missing_sizes

(array[])Associative array of arrays of image sub-size information for missing image sizes, keyed by image size name.

$image_meta

(array)The image meta data.

$attachment_id

(int)The image attachment post ID.


Top ↑

Source

File: wp-admin/includes/image.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.3.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.