Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: split optimized images into WebP and optimize audit #2216

Merged
merged 5 commits into from
May 16, 2017

Conversation

patrickhulce
Copy link
Collaborator

@patrickhulce patrickhulce commented May 10, 2017

closes #2044 and does some drive by cleanup of byte efficiency audits

Splits the audit to track two concerns separately:

  1. Are you doing the most sensible optimizations for your existing image format?
    JPEG doesn't have an insane amount of metadata or is too high quality, can be expanded to do the equivalent of PNG crush too.
  2. Are you using the most efficient image format for your content?
    Currently just a WebP check but could be fancier for your PNG could actually be a JPEG, etc.

Also reduces the aggressiveness of both of these by increasing the quality to 85 and increasing the ignore threshold to 4KB for JPEG and 8KB for WebP.

Questions:

  • Should the WebP check be moved down into diagnostics? No
  • Should we rename "Optimize images" since it's just tracking the lowest hanging fruit optimizations, if so, to what?

screenshot: (added by paul)

image

@ebidel
Copy link
Contributor

ebidel commented May 14, 2017

This makes sense to me. I think we should keep the audits in "Opportunities" (not move them to Diagnostics) as they are potential improvements to be made.

One thing, can you group the 3 image audits together, probably in this order:

  1. Properly size images
  2. Optimize images
  3. Convert images to WebP

screen shot 2017-05-14 at 3 37 35 pm

"Convert images to WebP" could also be "Serve images as WebP" to suggest that this would be in addition to serving other formats. But that would also address Kayce's concerns in the bug.

@ebidel
Copy link
Contributor

ebidel commented May 14, 2017

Needs a rebase.

@brendankenny brendankenny removed the #BOB label May 14, 2017
@brendankenny brendankenny removed their request for review May 14, 2017 19:44
@patrickhulce
Copy link
Collaborator Author

also turns out we've been hiding offscreen-images from the perf section this whole time, so I added that back

@patrickhulce
Copy link
Collaborator Author

@ebidel PTAL rebased and updated order :)

@paulirish paulirish merged commit 3c752a0 into master May 16, 2017
@paulirish paulirish deleted the split_optimize_images branch May 16, 2017 04:18
@paulirish
Copy link
Member

I'm really happy with this split. Good call.

I like the title of both of these audits now. seems good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

opinionated "unoptimized images" audit is opinionated
4 participants