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

Feat: add webp CLI to devcontainer #2522

Merged
merged 1 commit into from
Nov 13, 2024
Merged

Feat: add webp CLI to devcontainer #2522

merged 1 commit into from
Nov 13, 2024

Conversation

angela-tran
Copy link
Member

Part of #2490

This is an optional PR. If we don't want this in the devcontainer, we can just close this.

This PR installs CLI tools from Google, including cwebp, to create and work with WebP images, giving us a consistent way to create WebP images rather than each of us doing it our own way, e.g. using online tools like https://squoosh.app/ (from https://github.com/GoogleChromeLabs/squoosh) or using ImageMin, etc.

I couldn't find a way to just install cwebp, which is what I think we'd mainly use; the full webp package contains cwebp, so just install the whole thing.

Trying it locally

Rebuild the devcontainer, and then in a terminal, run cwebp to see the help screen.

calitp@415aa65007bd:/calitp/app$ cwebp
Usage:

   cwebp [options] -q quality input.png -o output.webp

where quality is between 0 (poor) to 100 (very good).
Typical value is around 80.

Try -longhelp for an exhaustive list of advanced options.

this gives us a consistent way of creating WebP images.
@angela-tran angela-tran self-assigned this Nov 13, 2024
@angela-tran angela-tran requested a review from a team as a code owner November 13, 2024 21:25
@github-actions github-actions bot added the docker Application container, devcontainer, Compose, etc. label Nov 13, 2024
Copy link

Coverage report

This PR does not seem to contain any modification to coverable code.

Copy link
Member

@thekaveman thekaveman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eh, why not?

@angela-tran angela-tran merged commit 15c4a9e into main Nov 13, 2024
12 checks passed
@angela-tran angela-tran deleted the feat/cwebp-cli branch November 13, 2024 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docker Application container, devcontainer, Compose, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants