[wp-trac] [WordPress Trac] #61916: Improving Image Upload Handling: Automatic Resizing for Large Images

WordPress Trac noreply at wordpress.org
Tue Sep 17 15:55:45 UTC 2024


#61916: Improving Image Upload Handling: Automatic Resizing for Large Images
---------------------------+------------------------------
 Reporter:  maheshmthorat  |       Owner:  (none)
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Media          |     Version:
 Severity:  normal         |  Resolution:
 Keywords:                 |     Focuses:
---------------------------+------------------------------

Comment (by hellofromTonya):

 == Reproduction Report
 This report validates that the issue can be reproduced.

 === Environment
 - OS: macOS
 - Web Server: Nginx
 - PHP: 8.3.8
 - WordPress: 6.6.2
 - Browser: Firefox 15.4
 - Theme: Twenty Twenty-Four
 - Active Plugins: None

 === Set up

 Image:
 I downloaded and used
 [https://core.trac.wordpress.org/attachment/ticket/55289/photo-1644433329707-2b528437a7e7.jpg
 this image] which has a size of 8294 × 12440.

 For adding the custom size, I added the following file: `wp-content/mu-
 plugins/test.php` with this code:

 {{{
 <?php

 add_action( 'after_setup_theme', function() {
         add_image_size( 'custom_size_2400', 2400 );
 } );
 }}}

 === Test Instructions

 1. Log into admin.
 2. Go to Media > Add New Media File.
 3. Select (or drag and drop) the large image to be uploaded.
 4. Once uploaded, check the generated scaled images in the `wp-
 content/uploads/` directory.
 🐞 Reported bug occurs here in that there should not be any scaled images
 with a custom dimension of 2400.

 === Actual Results

 ❌ Not able to reproduce the bug.

 This image was generated `photo-1644433329707-2b528437a7e7-2400x3600.jpg`.

 The 8294 × 12440 image was scaled to 2400 x 3600.

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


More information about the wp-trac mailing list