Increase the PHP memory_limit to WP_MAX_MEMORY_LIMIT in WP_Image_Editor_Imagick.
Props DH-Shredder fixes #22699 git-svn-id: http://core.svn.wordpress.org/trunk@22997 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9ba411d918
commit
63539ff739
|
@ -119,6 +119,9 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
|
|||
if ( ! is_file( $this->file ) && ! preg_match( '|^https?://|', $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 {
|
||||
$this->image = new Imagick( $this->file );
|
||||
|
||||
|
|
Loading…
Reference in New Issue