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

Add support for AVIF #130

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Add support for AVIF #130

wants to merge 9 commits into from

Commits on Dec 19, 2020

  1. Add support for AVIF

    Sharp should soon be releasing AVIF support. This PR uses the alpha-3 version of libvips and upcoming version of Sharp to add support for avif images.
    
    This should work the same as webp: there is an X-Avif header or `avif=1` param, and the detection is expected to be handled by a lamnda function the same as WebP (check for `accept:image/avif` header).
    
    The results in `test` are good and bad:
    
    ```
    ┌───────────────┬───────────────┬────────────────────┬──────────┬──────────┬──────────┬───────────────┬───────────────┐
    │ Image         │ Original Size │ Tachyon Size       │ 100px    │ 300px    │ 700px    │ 700px webp    │ 700px avif    │
    ├───────────────┼───────────────┼────────────────────┼──────────┼──────────┼──────────┼───────────────┼───────────────┤
    │ briefing-cop… │ 442.52 KB     │ 112.67 KB (25%)    │ 3.01 KB  │ 9.34 KB  │ 28.51 KB │ 15.31 KB (53… │ 14.57 KB (51… │
    │ hdr.jpg       │ 222.58 KB     │ 145.56 KB (65%)    │ 10.4 KB  │ 23.53 KB │ 85.59 KB │ 80.86 KB (94… │ 111.09 KB (1… │
    │ icons.png     │ 94.24 KB      │ 27.37 KB (29%)     │ 3.89 KB  │ 11.31 KB │ 26.94 KB │ 23.93 KB (88… │ 13.25 KB (49… │
    │ Website.png   │ 32.38 KB      │ 33.78 KB (104%)    │ 3.26 KB  │ 13.27 KB │ 33.78 KB │ 19.81 KB (58… │ 22.21 KB (65… │
    │ humans.png    │ 2.22 MB       │ 853.21 KB (37%)    │ 8.96 KB  │ 54.66 KB │ 273.89 … │ 139.19 KB (5… │ 174.48 KB (6… │
    └───────────────┴───────────────┴────────────────────┴──────────┴──────────┴──────────┴───────────────┴───────────────┘
    ```
    
    In some cases it's less than webp, and in some cases more. I think it might be to do with these comparisons being quality:100, where we might do better at slightly dropping quality.
    joehoyle committed Dec 19, 2020
    Configuration menu
    Copy the full SHA
    5dd0ab6 View commit details
    Browse the repository at this point in the history
  2. Update fixtures

    joehoyle committed Dec 19, 2020
    Configuration menu
    Copy the full SHA
    0d1ae30 View commit details
    Browse the repository at this point in the history

Commits on Dec 20, 2020

  1. Configuration menu
    Copy the full SHA
    4836b2b View commit details
    Browse the repository at this point in the history

Commits on Nov 29, 2021

  1. Configuration menu
    Copy the full SHA
    779e883 View commit details
    Browse the repository at this point in the history
  2. Fix sharp version

    joehoyle committed Nov 29, 2021
    Configuration menu
    Copy the full SHA
    3a1511f View commit details
    Browse the repository at this point in the history

Commits on Oct 10, 2024

  1. Configuration menu
    Copy the full SHA
    18d83a2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    eeab009 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ada6fd9 View commit details
    Browse the repository at this point in the history
  4. Remove unneeded filesize

    joehoyle committed Oct 10, 2024
    Configuration menu
    Copy the full SHA
    30d1c2c View commit details
    Browse the repository at this point in the history