editor_max_image_size WordPress Filter Hook

This hook allows you to modify the maximum image size allowed in the WordPress editor. By default, WordPress will allow you to upload images up to 10MB in size, but this hook can be used to increase or decrease that limit.

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_size

(int[])An array of width and height values.

  • (int) The maximum width in pixels.
  • '1'
    (int) The maximum height in pixels.

$size

(string|int[])Requested image size. Can be any registered image size name, or an array of width and height values in pixels (in that order).

$context

(string)The context the image is being resized for. Possible values are 'display' (like in a theme) or 'edit' (like inserting into an editor).


Top ↑

Source

File: wp-includes/media.php

View on Trac



Top ↑

Changelog

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