Make WordPress Core

Opened 4 years ago

Last modified 3 years ago

#50264 new defect (bug)

wp_get_image_editor()->multi_resize() occasionally fails

Reported by: dangerd512's profile dangerd512 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.4.1
Component: Media Keywords: reporter-feedback
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 (4)

#1 @SergeyBiryukov
4 years ago

  • Component changed from General to Media
  • Summary changed from Image to wp_get_image_editor()->multi_resize() occasionally fails

This ticket was mentioned in Slack in #core-media by antpb. View the logs.


3 years ago

#3 follow-up: @antpb
3 years ago

  • Keywords reporter-feedback added

Hello @dangerd512! Is your server configuration using GD or Imagick? Also is the failed image always the smallest size or always the last size generated?

#4 in reply to: ↑ 3 @dangerd512
3 years ago

Replying to antpb:

Hello @dangerd512! Is your server configuration using GD or Imagick? Also is the failed image always the smallest size or always the last size generated?

It's totally random... Mostly it's okay, only sometimes I have this issue. A lot of photos are processing everyday.

Imagick

Note: See TracTickets for help on using tickets.