Make WordPress Core

Opened 7 years ago

Last modified 4 years ago

#42953 new defect (bug)

Created images have a larger filesize than the original

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

Description

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 (4)

#1 @swissspidy
7 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 follow-up: @aristath
7 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.


5 years ago

#4 in reply to: ↑ 2 @wpwebdevj
4 years ago

Replying to aristath:

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

I think it's https://core.trac.wordpress.org/ticket/36477

Note: See TracTickets for help on using tickets.