[wp-trac] [WordPress Trac] #63481: WP_Image_Editor_Imagick takes longer time to upload image
WordPress Trac
noreply at wordpress.org
Mon May 26 18:21:20 UTC 2025
#63481: WP_Image_Editor_Imagick takes longer time to upload image
-------------------------------+------------------------------
Reporter: alimuzzamanalim | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version:
Severity: major | Resolution:
Keywords: reporter-feedback | Focuses:
-------------------------------+------------------------------
Comment (by SirLouen):
Replying to [comment:3 siliconforks]:
> Here's a simplified test script which demonstrates the issue:
>
> {{{#!php
> <?php
>
> $filename = '44.png';
> $width = 1024;
> $height = 665;
>
> $image = new Imagick( $filename );
> $image->resizeImage( $width, $height, Imagick::FILTER_TRIANGLE, 1 );
> $start_time = hrtime( true) ;
> $colors = $image->getImageColors();
> $end_time = hrtime( true );
> $nanoseconds = $end_time - $start_time;
> $seconds = $nanoseconds / 1e9;
> echo 'Elapsed time: ' . sprintf( '%.3F', $seconds ) . "\n";
> }}}
>
> This takes almost 10 seconds on my machine.
But you are only using `Imagick` here, not `WP_Image_Editor_Imagick`.
Theoretically, we cannot control how much does it take to resize an image
using a 3rd party library like this.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63481#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list