[wp-trac] [WordPress Trac] #35489: Im having an issue with WP_Image_Editor_Imagick
WordPress Trac
noreply at wordpress.org
Sat Jan 16 20:39:09 UTC 2016
#35489: Im having an issue with WP_Image_Editor_Imagick
--------------------------+-----------------------------
Reporter: stoi2m1 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 4.4.1
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
Im using this following to set up an editor to create thumbs for an image
I am uploading:
$editor = wp_get_image_editor( $file );
Some images are crashing my script causing a 500 error.
I tracked the issue down to the WP_Image_Editor_Imagick class specifically
within the crop_image function.
From what I could tell this is the line causing my 500 error
at line 349 of class-wp-image-editor-imagick.php
$this->image->cropImage( $src_w, $src_h, $src_x, $src_y );
I fixed the issue in a band-aid class I am temporarily using removing the
WP class and using my own with the wp_image_editors filter
within my added class I am using I added the following line
$this->image->setResourceLimit(6, 1); // set max threads to 1
I added it just before
$this->image->cropImage( $src_w, $src_h, $src_x, $src_y );
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35489>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list