On this page
apply_filters( 'editor_max_image_size', int[] $max_image_size, string|int[] $size, string $context )
Filters the maximum image size dimensions for the editor.
Parameters
$max_image_sizeint[]-
An array of width and height values.
- int
The maximum width in pixels.
1intThe maximum height in pixels.
- int
$sizestring|int[]-
Requested image size. Can be any registered image size name, or an array of width and height values in pixels (in that order).
$contextstring-
The context the image is being resized for.
Possible values are'display'(like in a theme) or'edit'(like inserting into an editor).
Source
File: wp-includes/media.php. View all references
list( $max_width, $max_height ) = apply_filters( 'editor_max_image_size', array( $max_width, $max_height ), $size, $context );
Related
Used By
| Used By | Description |
|---|---|
| image_constrain_size_for_editor() wp-includes/media.php | Scales down the default size of an image. |
Changelog
| Version | Description |
|---|---|
| 2.5.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/editor_max_image_size