- /**
- * Filter the memory limit allocated for image manipulation.
- *
- * @since 3.5.0
- *
- * @param int|string $limit Maximum memory limit to allocate for images. Default WP_MAX_MEMORY_LIMIT.
- * Accepts an integer (bytes), or a shorthand string notation, such as '256M'.
- */
- // Set artificially high because GD uses uncompressed images in memory
- @ini_set( 'memory_limit', apply_filters( 'image_memory_limit', WP_MAX_MEMORY_LIMIT ) );
+ // Set artificially high because GD uses uncompressed images in memory.
+ wp_raise_memory_limit( 'image' );