wp_image_src_get_dimensions WordPress Filter Hook

This hook allows you to get the dimensions of an image.

apply_filters( 'wp_image_src_get_dimensions', array|false $dimensions, string $image_src, array $image_meta, int $attachment_id ) #

Filters the ‘wp_image_src_get_dimensions’ value.


Parameters

$dimensions

(array|false)Array with first element being the width and second element being the height, or false if dimensions could not be determined.

$image_src

(string)The image source file.

$image_meta

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

$attachment_id

(int)The image attachment ID. Default 0.


Top ↑

Source

File: wp-includes/media.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.7.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.

Show More
Show More