Make WordPress Core

Opened 2 years ago

Last modified 7 weeks ago

#50667 new defect (bug)

New attachment size is created even the source is smaller

Reported by: adamradocz's profile adam.radocz Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.4.2
Component: Media Keywords: needs-patch
Focuses: performance Cc:

Description

When you upload a very optimized image sometimes the created attachment size's file size is larger than the source image. When a new size is created its filesize should be checked whether it's really smaller or not. Now it just allocates extra space and uses extra bandwidth.

Sample image: https://ibb.co/x8LhGC0

Attachments (1)

P1020239.jpg (31.8 KB) - added by adam.radocz 2 years ago.
Sample image

Download all attachments as: .zip

Change History (3)

@adam.radocz
2 years ago

Sample image

This ticket was mentioned in Slack in #core-media by antpb. View the logs.


7 weeks ago

#2 @adamsilverstein
7 weeks ago

Hi @adamradocz - thanks for opening the ticket and providing the sample image.

When you upload a very optimized image sometimes the created attachment size's file size is larger than the source image

Can you clarify which image (size) you are referring to? When uploading, core typically creates numerous sizes (the default core size + any custom sizes added by your theme or plugins). Are you inserting/using the "full" sized image?

Can you please provide exact steps to reproduce? Where are you seeing the larger created image (on the server only, or is it used on the website frontend)?

Note: See TracTickets for help on using tickets.