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

Astro: avif files can't be optimized, result in a lot of errors #33

Closed
mandar1jn opened this issue Jan 19, 2023 · 2 comments
Closed

Astro: avif files can't be optimized, result in a lot of errors #33

mandar1jn opened this issue Jan 19, 2023 · 2 comments

Comments

@mandar1jn
Copy link

Hi. I just tries your tool with my astro website and it results in a lot of errors because it can't obtain metadata on avif images.
The repository for my website can be found here: https://github.com/mandar1jn/portfolio.

Logs:

     __                                    __    
    |__|____    _____ ___________    ____ |  | __
    |  \__  \  /     \\____ \__  \ _/ ___\|  |/ /
    |  |/ __ \|  Y Y  \  |_> > __ \\  \___|    <
/\__|  (____  /__|_|  /   __(____  /\___  >__|_ \
\______|    \/      \/|  |       \/     \/     \/
 v0.5.0               |__| by ‹div›RIOTS


 PASS 1 - Optimizing 
▶ 404.html
  ✔ <img> [0/0]
▶ index.html
  ⠋ avif
avif
avif
avif
avif
avif
avif
avif
avif
avif
  ✖ <img> [5/5]
  5 issues
▶ projects/index.html
  ⠋ avif
avif
  ✖ <img> [1/1]
  1 issue
▶ posts/index.html
  ⠋ avif
avif
avif
avif
avif
avif
avif
avif
avif
avif
  ✖ <img> [5/5]
  5 issues
▶ projects/planet-clash/index.html
  ⠋ avif
avif
avif
avif
avif
avif
avif
avif
  ✖ <img> [4/4]
  4 issues
▶ posts/dissecting-the-skylanders-portal-part1/index.html
  ⠋ avif
avif
  ✖ <img> [1/1]
  1 issue
▶ posts/dissecting-the-skylanders-portal-part2/index.html
  ⠋ avif
avif
  ✖ <img> [1/1]
  1 issue
▶ posts/dissecting-the-skylanders-portal-part3/index.html
  ⠋ avif
avif
avif
avif
  ✖ <img> [2/2]
  2 issues
▶ posts/dissecting-the-skylanders-portal-part4/index.html
  ⠋ avif
avif
  ✖ <img> [1/1]
  1 issue
▶ posts/some-big-skylanders-discoveries/index.html
  ⠋ avif
avif
  ✖ <img> [1/1]
  1 issue
Done: 318.286ms

 PASS 2 - Compressing the rest 
✔ 39 files | 467.96 KB → 378.87 KB | -89.09 KB
Done: 393.445ms

 Summary 
╔════════╤════════════╤═══════════╤════════════╤═══════════╗
║ Action │ Compressed │  Original │ Compressed │      Gain ║
╟────────┼────────────┼───────────┼────────────┼───────────╢
║ .html  │    10 / 10 │  83.25 KB │   82.97 KB │ -283.00 B ║
║ .css   │      9 / 9 │  18.47 KB │   17.69 KB │ -795.00 B ║
║ .jpg   │      1 / 1 │ 174.23 KB │   86.20 KB │ -88.04 KB ║
╟────────┼────────────┼───────────┼────────────┼───────────╢
║ Total  │    20 / 39 │ 467.96 KB │  378.87 KB │ -89.09 KB ║
╚════════╧════════════╧═══════════╧════════════╧═══════════╝


 Issues 

▶ index.html

 erro  Can't get image meta information of "/_astro/foto_1dyieW.avif" - some optimizations are not possible without this information.

 erro  Can't get image meta information of "/_astro/icon_ZeHo3k.avif" - some optimizations are not possible without this information.

 erro  Can't get image meta information of "/_astro/runic-portal_ZnccTB.avif" - some optimizations are not possible without this information.

 erro  Can't get image meta information of "/_astro/runic-portal_ZnccTB.avif" - some optimizations are not possible without this information.

 erro  Can't get image meta information of "/_astro/runic-portal_ZnccTB.avif" - some optimizations are not possible without this information.

▶ projects/index.html

 erro  Can't get image meta information of "/_astro/icon_ZeHo3k.avif" - some optimizations are not possible without this information.

▶ posts/index.html

 erro  Can't get image meta information of "/_astro/runic-portal_ZnccTB.avif" - some optimizations are not possible without this information.

 erro  Can't get image meta information of "/_astro/runic-portal_ZnccTB.avif" - some optimizations are not possible without this information.

 erro  Can't get image meta information of "/_astro/runic-portal_ZnccTB.avif" - some optimizations are not possible without this information.

 erro  Can't get image meta information of "/_astro/runic-portal_ZnccTB.avif" - some optimizations are not possible without this information.

 erro  Can't get image meta information of "/_astro/runic-portal_ZnccTB.avif" - some optimizations are not possible without this information.

▶ projects/planet-clash/index.html

 erro  Can't get image meta information of "/_astro/icon_ZrLxOj.avif" - some optimizations are not possible without this information.

 erro  Can't get image meta information of "/_astro/main_menu_ZEQqL3.avif" - some optimizations are not possible without this information.

 erro  Can't get image meta information of "/_astro/gameplay_ZPk7AJ.avif" - some optimizations are not possible without this information.

 erro  Can't get image meta information of "/_astro/lose_ro12T.avif" - some optimizations are not possible without this information.

▶ posts/dissecting-the-skylanders-portal-part1/index.html

 erro  Can't get image meta information of "/_astro/runic-portal_Z1Va0dh.avif" - some optimizations are not possible without this information.

▶ posts/dissecting-the-skylanders-portal-part2/index.html

 erro  Can't get image meta information of "/_astro/runic-portal_Z1Va0dh.avif" - some optimizations are not possible without this information.

▶ posts/dissecting-the-skylanders-portal-part3/index.html

 erro  Can't get image meta information of "/_astro/runic-portal_Z1Va0dh.avif" - some optimizations are not possible without this information.

 erro  Can't get image meta information of "/_astro/editor-raylib_ZPrYO9.avif" - some optimizations are not possible without this information.

▶ posts/dissecting-the-skylanders-portal-part4/index.html

 erro  Can't get image meta information of "/_astro/runic-portal_Z1Va0dh.avif" - some optimizations are not possible without this information.

▶ posts/some-big-skylanders-discoveries/index.html

 erro  Can't get image meta information of "/_astro/runic-portal_Z1Va0dh.avif" - some optimizations are not possible without this information.


 21 issue(s) over 9 files 

Here is my dist folder (uncompressed):
dist (2).zip

@georges-gomes
Copy link
Member

georges-gomes commented Jan 20, 2023

Thanks for all the precious information.

Version 0.5.1 now supports avif

Your website with this result:

╔════════╤════════════╤═══════════╤════════════╤═══════════╗
║ Action │ Compressed │  Original │ Compressed │      Gain ║
╟────────┼────────────┼───────────┼────────────┼───────────╢
║ .html  │    10 / 10 │  83.57 KB │   83.30 KB │ -283.00 B ║
║ .css   │      9 / 9 │  18.47 KB │   17.69 KB │ -795.00 B ║
║ .jpg   │      1 / 1 │ 174.23 KB │   86.20 KB │ -88.04 KB ║
║ .avif  │     0 / 18 │ 110.86 KB │  110.86 KB │           ║
║ .txt   │      0 / 1 │   53.00 B │    53.00 B │           ║
║ .xml   │      0 / 3 │  50.74 KB │   50.74 KB │           ║
║ .png   │      0 / 6 │  85.80 KB │   85.80 KB │           ║
╟────────┼────────────┼───────────┼────────────┼───────────╢
║ Total  │    20 / 48 │ 523.72 KB │  434.63 KB │ -89.09 KB ║
╚════════╧════════════╧═══════════╧════════════╧═══════════╝


 ✔ No issues 

But jampack doesn't support responsive images for avif yet. Next on the list :D

@georges-gomes
Copy link
Member

@mandar1jn and new version 0.5.2 supports avif responsive images now.
But on your site, images are small and well compressed so there is not a lot of resized images created.
Enjoy

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