WP_Image_Editor::get_size() WordPress Method
The WP_Image_Editor::get_size() method is used to get the width and height of an image. This is useful for getting the dimensions of an image so that you can resize it or crop it accordingly. The method returns an array with the width and height of the image.
WP_Image_Editor::get_size() #
Gets dimensions of image.
Return
(int[]) Dimensions of the image.
- 'width'
(int) The image width. - 'height'
(int) The image height.
Source
File: wp-includes/class-wp-image-editor.php
public function get_size() { return $this->size; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
3.5.0 | Introduced. |