[wp-trac] [WordPress Trac] #40415: Imagick resize filter hook

WordPress Trac noreply at wordpress.org
Tue Jun 3 04:21:17 UTC 2025


#40415: Imagick resize filter hook
-------------------------------------------------+-------------------------
 Reporter:  virgodesign                          |       Owner:
                                                 |  adamsilverstein
     Type:  enhancement                          |      Status:  assigned
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  Media                                |     Version:  4.7.3
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-test-info dev-         |     Focuses:
  feedback                                       |
-------------------------------------------------+-------------------------

Comment (by ravigadhiyawp):

 == Test Report

 === Description
 This report validates whether the indicated patch works as expected.

 Patch tested: https://patch-diff.githubusercontent.com/raw/WordPress
 /wordpress-develop/pull/8836.diff

 === Environment
 - WordPress: 6.8.1
 - PHP: 8.2.23
 - Server: nginx/1.26.1
 - Database: mysqli (Server: 8.0.35 / Client: mysqlnd 8.2.23)
 - Browser: Chrome 137.0.0.0
 - OS: Windows 10/11
 - Theme: Twenty Twenty-Five 1.2
 - MU Plugins: None activated
 - Plugins:
   * Imagick Resize Filter Demo 1.0.0
   * Test Reports 1.2.0

 === Actual Results
 1.  ✅ The patch applies cleanly.
 2.  ✅ thumbnail_image() is now public and accessible externally.
 3.  ✅ imagick_resize_filter hook is available and functions correctly.
 4.  ✅ Plugin successfully overrides the default Imagick filter using the
 new hook.
 5.  ✅ Custom filter results in crisper, more optimized thumbnails without
 manually toggling filters globally.
 6.  ✅ No issues with media uploads, image cropping, or other editor
 functionality.

 === Additional Notes

 Patch test with the plugin: https://raw.githubusercontent.com/SirLouen
 /imagick-resize-filter-demo/refs/tags/1.0.0/imagick-resize-filter-demo.php

 The patch introduces two key improvements:

 1. Makes the thumbnail_image() method public, allowing plugin developers
 to directly invoke the core Imagick-based resize routine.
 2. Adds a new filter hook imagick_resize_filter, enabling developers to
 dynamically customize the Imagick filter used for resizing operations.

 === Supplemental Artifacts
 Screenshot: https://core.trac.wordpress.org/attachment/ticket/40415
 /Imagick-Resize-Demo-WordPress-06-02-2025_09_33_PM.png

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/40415#comment:37>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list