Make WordPress Core

Opened 3 years ago

Last modified 16 months ago

#53669 assigned defect (bug)

Respect the quality settings in `wp_editor_set_quality` for lossless WebP

Reported by: kirasong's profile kirasong Owned by: adamsilverstein's profile adamsilverstein
Milestone: Future Release Priority: normal
Severity: normal Version: 5.8
Component: Media Keywords: needs-patch
Focuses: Cc:

Description

In Imagick, WordPress now supports saving lossless WebP images when the source is a lossless WebP image. 🎉

This happens inside the Imagick editor in `set_quality`.

The filter, wp_editor_set_quality, applies before this is run, in the parent class.

This means that if a WebP is detected as Lossless, it isn't possible to override lossless thumbnailing with wp_editor_set_quality.

WordPress should respect the wp_editor_set_quality filter's override, unless `set_quality()` is run manually.

Change History (12)

#1 follow-up: @desrosj
3 years ago

  • Milestone changed from Awaiting Review to Future Release

It seems like having lossy and lossless may be a thing of the future. In addition to WebP, JPEG XL appears to also support both.

If this is the case, I think adding an additional quality filter for compression makes sense.

  • wp_editor_set_quality for the compression within the image editing tool of choice.
  • wp_image_compression for lossy, lossless, or null when the format does not differentiate with the default being the same as the original uploaded image.

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


3 years ago

#3 in reply to: ↑ 1 ; follow-up: @kirasong
3 years ago

Replying to desrosj:

It seems like having lossy and lossless may be a thing of the future. In addition to WebP, JPEG XL appears to also support both.

If this is the case, I think adding an additional quality filter for compression makes sense.

  • wp_editor_set_quality for the compression within the image editing tool of choice.
  • wp_image_compression for lossy, lossless, or null when the format does not differentiate with the default being the same as the original uploaded image.

Looks like AVIF supports lossless as well!

I like this proposal / direction.

#4 in reply to: ↑ 3 @azaozz
3 years ago

  • Milestone changed from Future Release to 5.9

Replying to mikeschroder:

I like this proposal / direction.

Same here.

Lets try to add that in 5.9. Would be pretty nice to use when converting uploaded images to WebP or lossless to lossy.

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


2 years ago

#6 @hellofromTonya
2 years ago

  • Milestone changed from 5.9 to 6.0

5.9 Beta 1 release is happening in a few hours. With no patch or activity, moving it to 6.0.

#7 @adamsilverstein
2 years ago

  • Owner set to adamsilverstein
  • Status changed from new to assigned

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


2 years ago

#9 @costdev
23 months ago

  • Milestone changed from 6.0 to 6.1

With 6.0 RC1 tomorrow, I'm moving this to the 6.1 milestone.

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


21 months ago

#11 @davidbaumwald
18 months ago

  • Milestone changed from 6.1 to Future Release

After chatting with @flixos90 and the revert(r54226) of the main WebP generation feature for 6.1, moving this to Future Release for continued discussion and work.

#12 @abitofmind
16 months ago

Will this feature here ensure all 3 criteria as proposed in #57238 ?

Note: See TracTickets for help on using tickets.