[wp-trac] [WordPress Trac] #50265: Image

WordPress Trac noreply at wordpress.org
Wed May 27 12:26:32 UTC 2020


#50265: Image
--------------------------+-----------------------------
 Reporter:  dangerd512    |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  5.4.1
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 I'm using wp_get_image_editor to create different sizes of same image, in
 99.9% it works fine, but sometimes happens this:
 [[Image(http://files.dangerd.org/pub/!PUBLIC//wpbug2.png)]]
 All images are generated with smallest size in array, any ideas?
 {{{#!php
 <?php
 $image = wp_get_image_editor( $source );
 $image->resize( 1920, 1282, false );
 $image->set_quality(65);
 $image->save( $path );
 $sizes = array(
         array('width'=>640,'height'=>480,'crop'=>false),
         array('width'=>640,'height'=>480,'crop'=>true),
         array('width'=>150,'height'=>150,'crop'=>true),

 );
 $mult = $image->multi_resize( $sizes );
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/50265>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list