[wp-trac] [WordPress Trac] #50866: Media Uploader Blows Up File Sizes
WordPress Trac
noreply at wordpress.org
Thu Aug 5 14:23:22 UTC 2021
#50866: Media Uploader Blows Up File Sizes
-------------------------------------+-------------------------------------
Reporter: hvar | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.9
Component: Media | Version: 5.4.2
Severity: major | Resolution:
Keywords: has-patch has-unit- | Focuses: administration,
tests dev-feedback needs-testing | performance
has-testing-info |
-------------------------------------+-------------------------------------
Comment (by ashfame):
Running `WP 5.9-alpha-51272-src`, I took a 512x512 png image and ran
through optimization to reduce its size to 1.5K and when I uploaded this
image `512x512-2.png` directly to the media library, an additional 512x512
image was indeed created even though I had set the medium size as 512x512.
And we can see the size of that copy is bigger than the original size
(3.2K).
{{{
-rw-r--r-- 1 ashfame staff 902B Aug 5 18:45 512x512-2-150x150.png
-rw-r--r-- 1 ashfame staff 3.2K Aug 5 18:45 512x512-2-512x512.png
-rw-r--r-- 1 ashfame staff 1.5K Aug 5 18:45 512x512-2.png
}}}
Exactly the same thing happened when I uploaded it directly from WordPress
block editor (without Gutenberg plugin) while creating a post. But the
image that was actually added in the post was the original image. So, this
issue couldn't be reproduced.
I took a quick look at the patch but chose not to test it at all as its
about changing the logic of choosing which image to select for a
particular size (which doesn't seem to be an issue anymore) and nothing
about preventing the additional image size from being generated (which is
still an issue, though a trivial one).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50866#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list