wppaste
WordPress

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

Since
2.5.0
Filters the maximum image size dimensions for the editor.

Compatibility

WordPress
since 2.5.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Parameters

$max_image_sizeint[]
{ An array of width and height values.
@type int $0 The maximum width in pixels.
@type int $1 The maximum height in pixels.
}
  • $0int

    The maximum width in pixels.
  • $1int

    The maximum height in pixels.
$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).

Where this hook fires · 1

  • wp-includes/media.php:146image_constrain_size_for_editor()

Changelog

Introduced in 2.5.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.