apply_filters( ‘editor_max_image_size’, int[] $max_image_size, string|int[] $size, string $context )

In this article

Filters the maximum image size dimensions for the editor.


An array of width and height values.
  • int
    The maximum width in pixels.
  • 1 int
    The maximum height in pixels.
Requested image size. Can be any registered image size name, or an array of width and height values in pixels (in that order).
The context the image is being resized for.
Possible values are 'display' (like in a theme) or 'edit' (like inserting into an editor).


list( $max_width, $max_height ) = apply_filters( 'editor_max_image_size', array( $max_width, $max_height ), $size, $context );



User Contributed Notes

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