WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#6289 closed enhancement (fixed)

Allow definition of thumbnail quality

Reported by: RyanWilliams Owned by: westi
Milestone: 2.5 Priority: normal
Severity: minor Version: 2.5
Component: Administration Keywords:
Focuses: Cc:

Description

This is a borderline bug in my opinion.

At the moment there is no way for users to define the quality of automatically generated image thumbnails, which isn't so much of a problem for default thumbnails (indeed, it's optimised for such a size) but is terrible for users who modify the size themselves using the height/width options introduced with WordPress 2.5.

Smaller thumbnails need higher quality or the compression destroys them, with the effects becoming worse as they get smaller. The opposite is true for larger thumbnails (some people use 640x480+ for thumbnails, especially in the case of photo/gallery sites), which need *less* quality or the file size becomes too big.

Change History (8)

comment:1 RyanWilliams6 years ago

  • Milestone changed from 2.6 to 2.5

comment:2 RyanWilliams6 years ago

Rongo on the WordPress forums has highlighted where this is defined:

Location:
/wp-includes/media.php

On Line 178:
$jpeg_quality=75

A simple editable field for the number should be sufficient.

comment:3 ffemtcj6 years ago

  • Milestone changed from 2.5 to 2.7

No Patch. Moved to 2.7

comment:4 westi6 years ago

  • Milestone changed from 2.7 to 2.5
  • Owner changed from anonymous to westi
  • Status changed from new to assigned

Not convinced a UI option is best for this as the audience for changing it is small.

Much better to have a filter so that a simple plugin can change the value used.

comment:5 westi6 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [7444]) Add a filter to the jpeg_quality to allow for it to be modified. Fixes #6289.

comment:6 follow-up: RyanWilliams6 years ago

Perhaps, but in that case there should definitely be an automatic quality adjustment that's based on the dimensions.

The inadequacy of 75 as a quality level when the dimensions variate higher or lower than the default dimensions is what prompted me to enter this ticket. If 2.5's thumbnail size setting is set to much lower than the default, the quality muddies the image into illegibility; if it's set much higher, it's not compressing it *enough* and the file size balloons unnecessarily.

Perhaps simply having quality regions would be sufficient. That is, the quality starts off high at smaller sizes, and goes down in steps to a minimum of, say, 50.

There've already been numerous people saying the thumbnails look horrible after using 2.5 RC1's dimension editor, and having to hack their files on the WordPress forums to compensate; if people are already unhappy with it in the RC1 stage, I imagine lots more people will be unhappy once it's put into production use.

comment:7 in reply to: ↑ 6 ; follow-up: lloydbudd6 years ago

Replying to RyanWilliams:

Perhaps simply having quality regions would be sufficient. That is, the quality starts off high at smaller sizes, and goes down in steps to a minimum of, say, 50.

That is an intreging idea. Please open a new ticket (with code ;-) )

comment:8 in reply to: ↑ 7 westi6 years ago

Replying to lloydbudd:

Replying to RyanWilliams:

Perhaps simply having quality regions would be sufficient. That is, the quality starts off high at smaller sizes, and goes down in steps to a minimum of, say, 50.

That is an intreging idea. Please open a new ticket (with code ;-) )

+1

Note: See TracTickets for help on using tickets.