[wp-trac] [WordPress Trac] #62388: If image size exists with crop and without crop, only 1 will be created,

WordPress Trac noreply at wordpress.org
Tue Nov 12 09:34:22 UTC 2024


#62388: If image size exists with crop and without crop, only 1 will be created,
--------------------------+------------------------------
 Reporter:  kkmuffme      |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Media         |     Version:
 Severity:  major         |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by abcd95):

 Hi, Thanks for bringing this up.

 I propose a solution, The fix adds a `-cropped` suffix to cropped image
 filenames in the `generate_filename()` method of the `WP_Image_Editor`
 class. This ensures unique filenames for cropped and uncropped versions.

 Please let me know if we can do better.

 Thanks.

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


More information about the wp-trac mailing list