_IMG_MAX_SIZE

This constant defines the maximum size in kilobytes up to which SPIP will still accept to save an image [1].

It is possible to define this constant in your config/mes_options.php file (refer to the article dedicated to The mes_options.php file). [2]

-  The default value is : 0

Example:

// images larger than 450 KB will not be saved
define('_IMG_MAX_SIZE', 350);

When this constant is defined as 0 (zero), SPIP will not do any size checking when uploading an image.

This constant should not be confused with _IMG_MAX_WIDTH and _IMG_MAX_HEIGHT.

Footnotes

[1Given how the upload forms actually work, the image file will still be sent to the server. It is only actually once it has been "uploaded" that SPIP will check that the file conforms to the constant.

[2Attention, this will generate a PHP NOTICE type warning message: check that the server does not display this type of error.

Author Mark Published : Updated : 08/07/23

Translations : català, English, français, Nederlands