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

Images stay jpg, not webp #83

Closed
silveltman opened this issue Jul 14, 2023 · 2 comments
Closed

Images stay jpg, not webp #83

silveltman opened this issue Jul 14, 2023 · 2 comments

Comments

@silveltman
Copy link

My images do get transformed into multiple sizes with the correct srcset. However, all my jpg's stay jpg's. They are not turned into webp.

 Summary 
╔══════════════╤════════════╤═══════════╤════════════╤════════════╗
║ Action       │ Compressed │  Original │ Compressed │       Gain ║
╟──────────────┼────────────┼───────────┼────────────┼────────────╢
║ svg->svg     │    16 / 16 │  53.63 KB │   34.78 KB │  -18.84 KB ║
║ jpg->jpg     │    21 / 21 │ 108.62 MB │   11.10 MB │  -97.52 MB ║
║ png->webp    │      1 / 1 │   1.46 MB │  631.46 KB │ -867.61 KB ║
║ .css         │      2 / 2 │  59.48 KB │   54.25 KB │   -5.24 KB ║
║ .svg         │      2 / 2 │   4.31 KB │    2.60 KB │   -1.71 KB ║
║ .js          │      3 / 3 │  42.17 KB │   41.53 KB │  -657.00 B ║
║ .html        │      8 / 8 │  59.33 KB │   59.30 KB │   -30.00 B ║
║ .png         │     6 / 12 │   1.53 MB │    1.50 MB │  -36.73 KB ║
║ .jpg         │    12 / 12 │  86.73 MB │    7.32 MB │  -79.41 MB ║
║ .jpeg        │      3 / 3 │   2.02 MB │    1.45 MB │ -579.60 KB ║
║ .webp        │      1 / 1 │ 109.54 KB │   97.35 KB │  -12.18 KB ║
║ webp->jpg    │      0 / 2 │ 219.07 KB │  232.08 KB │            ║
║ .txt         │      0 / 1 │   73.00 B │    73.00 B │            ║
║ .xml         │      0 / 3 │   1.18 KB │    1.18 KB │            ║
║ .pdf         │      0 / 1 │ 325.77 KB │  325.77 KB │            ║
║ .ico         │      0 / 1 │  14.73 KB │   14.73 KB │            ║
║ .webmanifest │      0 / 1 │  456.00 B │   456.00 B │            ║
╟──────────────┼────────────┼───────────┼────────────┼────────────╢
║ Total        │    75 / 90 │ 201.23 MB │   22.83 MB │ -178.41 MB ║
@georges-gomes
Copy link
Member

Hi!

If the jpg is detected as in "above-the-fold" then they are turned into progressive jpeg and not webp for better LCP performance.

I will improve the logging to make this more apparent.

That's also maybe what happened here:
║ webp->jpg │ 0 / 2 │ 219.07 KB │ 232.08 KB │ ║

If you really want webp, even "above-the-fold", I will make an option for this.

Meanwhile, if it's simple, you can add <the-fold></the-fold> at the top of your html <head> and then everything will be treated as "after-the-fold" and everything will be webp.

But if you care about performance, I think the default setting is the right way to go 👍

@georges-gomes
Copy link
Member

Logs will be improved. Meanwhile this can be closed.

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

No branches or pull requests

2 participants