Increase the PHP memory_limit to WP_MAX_MEMORY_LIMIT in WP_Image_Editor_Imagick.
Props DH-Shredder fixes #22699 git-svn-id: https://develop.svn.wordpress.org/trunk@22997 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
4acd3d7db8
commit
ecb18ffc05
|
@ -119,6 +119,9 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
|
||||||
if ( ! is_file( $this->file ) && ! preg_match( '|^https?://|', $this->file ) )
|
if ( ! is_file( $this->file ) && ! preg_match( '|^https?://|', $this->file ) )
|
||||||
return new WP_Error( 'error_loading_image', __('File doesn’t exist?'), $this->file );
|
return new WP_Error( 'error_loading_image', __('File doesn’t exist?'), $this->file );
|
||||||
|
|
||||||
|
// Even though Imagick uses less PHP memory than GD, set higher limit for users that have low PHP.ini limits
|
||||||
|
@ini_set( 'memory_limit', apply_filters( 'image_memory_limit', WP_MAX_MEMORY_LIMIT ) );
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$this->image = new Imagick( $this->file );
|
$this->image = new Imagick( $this->file );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue