WordPress.org

Make WordPress Core

Opened 2 months ago

Last modified 2 months ago

#50264 new defect (bug)

wp_get_image_editor()->multi_resize() occasionally fails

Reported by: dangerd512 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.4.1
Component: Media Keywords:
Focuses: Cc:

Description

I'm using wp_get_image_editor to create different sizes of same image, in 99.9% it works fine, but sometimes happens this:
http://files.dangerd.org/pub/!PUBLIC//wpbug2.png
All images are generated with smallest size in array, any ideas?

<?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 );

Change History (1)

#1 @SergeyBiryukov
2 months ago

  • Component changed from General to Media
  • Summary changed from Image to wp_get_image_editor()->multi_resize() occasionally fails
Note: See TracTickets for help on using tickets.