[wp-trac] [WordPress Trac] #57370: WP_Image_Editor_Imagick creates unexpected 'thumbnail' image size when original image is 150x150

WordPress Trac noreply at wordpress.org
Mon Mar 6 16:27:39 UTC 2023


#57370: WP_Image_Editor_Imagick creates unexpected 'thumbnail' image size when
original image is 150x150
--------------------------------------+------------------------------
 Reporter:  danielbachhuber           |       Owner:  danielbachhuber
     Type:  defect (bug)              |      Status:  closed
 Priority:  normal                    |   Milestone:  6.2
Component:  Media                     |     Version:
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+------------------------------

Comment (by hellofromTonya):

 In [changeset:"55467" 55467]:
 {{{
 #!CommitTicketReference repository="" revision="55467"
 Tests: Improve
 Tests_Media::test_wp_generate_attachment_metadata_doesnt_generate_sizes_for_150_square_image().

 Changes:

 * from `assertEquals()` to `assertSame()`. Why? To ensure both the return
 value and data type match the expected results.

 * the expected height and width from `string` to `integer` data types. Why
 integer? `getimagesize()` (within `wp_getimagesize()`) will return an
 integer for both height and weight.

 * adds the ticket annotation.

 * adds assertion failure messages. Why? To denote which assertion failed,
 which aids in debugging efforts.

 Follow-up to [55278].

 Props costdev, peterwilsoncc, mukesh27, ankitmaru, hellofromTonya.
 See #56800, #57370.
 }}}

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


More information about the wp-trac mailing list