Make WordPress Core

Opened 3 years ago

Last modified 15 months ago

#42953 new defect (bug)

Created images have a larger filesize than the original

Reported by: aristath Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Media Keywords:
Focuses: Cc:


Images uploaded in the media library get resized to the defined sizes. However, if the image has been optimized beforehand the result can be that the generated images have a filesize larger than the originally uploaded image.

It can happen due to a very high jpeg_quality value for example..

This should not happen under any circumstances. Uploading optimized images is something a lot of people do for SEO purposes, and larger generated images affect that negatively.

Sometimes even if the image-size is smaller, the generated file's filesize is bigger.

One solution would be to save the image in a temp location and have its filesize checked against the original image. If the image is smaller than the original one then move to its final location. If not, then some other solution has to be found.

Change History (3)

#1 @swissspidy
3 years ago

  • Component changed from General to Media
  • Version trunk deleted

Pretty sure has been reported before in another ticket, I just can't find it right now.

#2 @aristath
3 years ago

Yeah, I spent 10 minutes looking for another ticket too but couldn't find one - which is why I created this one.

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

15 months ago

Note: See TracTickets for help on using tickets.