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

[Documentation] Broken link and missing config examples #274

Open
1 task done
dmyersturnbull opened this issue Jul 16, 2024 · 2 comments
Open
1 task done

[Documentation] Broken link and missing config examples #274

dmyersturnbull opened this issue Jul 16, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@dmyersturnbull
Copy link

dmyersturnbull commented Jul 16, 2024

Describe the bug

Hi,

The readme contains a broken link: https://github.com/calibreapp/image-actions#Configuration.

I'm also wondering if the documentation on the options/arguments could be more clear; I wasn't sure about some aspects. Apologies if I misuse any terminology!

  • How the *Quality (e.g. jpegQuality) options are used. My understanding at first was that the compression can be constrained to result in no perceptible quality loss; that is, pseudo-lossless or nominally lossy.
  • Whether options available other than *Quality (e.g. jpegQuality). I confirmed none were, but only from action.yml.
  • (A related feature request): The Sharp docs list AVIF support, along with HEIF.
    Would introducing AVIF support only need these options to be passed along?

Also, thanks for maintaining this tool for the community. I'm happy to contribute if it's useful.

Code of Conduct

  • I agree to follow this project’s Code of Conduct
@dmyersturnbull dmyersturnbull added the bug Something isn't working label Jul 16, 2024
@benschwarz
Copy link
Member

Hey @dmyersturnbull, thanks for raising these clarifications.

I agree, the quality options could probably be better documented. Here's the TLDR version of how the quality arguments are used:

*Quality (e.g.) jpegQuality configuration is passed directly to sharp. There's also pngQuality and webpQuality

At the moment image-actions re-encodes/compresses existing images in a repository. In theory image-actions can support AVIF and HEIF resources (thanks to sharp), though it would require users to add AVIF or HEIF files to their repositories.

Personally, I have no issue in adding AVIF and HEIF as options, though haven't had much motivation to make such a change as I've not seen these compression algorithms in regular use outside CDNs.

Generally speaking, I think a better approach is to create primary image resources using well-deployed formats (e.g. webp, png. sidenote: webp are a bit of a pain without specialist tools!), then use a CDN to transcode images on the fly, based on what the end users browser supports.

@dmyersturnbull, if you've interest and time to contribute, I'd happily accept PRs to address the points you've raised in this issue. Thanks again 🥞

@dmyersturnbull
Copy link
Author

@benschwarz Thanks! That's very helpful. I'll try it out and also add a clarification to the readme.

In Chrome, I'm now regularly seeing AVIF and occasionally some HEIF in the wild (presumably mostly from CDNs). I end up with AVIFs naturally as AV1 snapshots, though admittedly I have no motivation to keep those in Git :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants