image_memory_limit filter-hook . WP 3.5.0
Filters the memory limit allocated for image manipulation.
Usage
add_filter( 'image_memory_limit', 'filter_function_name_3500' ); function filter_function_name_3500( $filtered_limit ){ // filter... return $filtered_limit; }
- $filtered_limit(int/string)
- Maximum memory limit to allocate for images.ini
memory_limit
, whichever is higher. Accepts an integer (bytes), or a shorthand string notation, such as '256M'.
Default:WP_MAX_MEMORY_LIMIT
or the original php
Notes
- Since 4.6.0 The default now takes the original
memory_limit
into account.
Where the hook is called
wp-includes/functions.php 5737
$filtered_limit = apply_filters( 'image_memory_limit', $filtered_limit );