Skip to content

Add WebP image support#31

Open
Alanaktion wants to merge 3 commits into
danielgatis:masterfrom
Alanaktion:webp
Open

Add WebP image support#31
Alanaktion wants to merge 3 commits into
danielgatis:masterfrom
Alanaktion:webp

Conversation

@Alanaktion
Copy link
Copy Markdown

This is a pretty small change, just adding support for WebP images using the official Go package.

Copilot AI review requested due to automatic review settings May 6, 2026 22:42
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds WebP decoding support to imgcat by recognizing the image/webp MIME type and decoding WebP images via golang.org/x/image/webp.

Changes:

  • Allow image/webp in the MIME allowlist used during input validation.
  • Decode WebP inputs with webp.Decode as a dedicated branch (similar to ICO handling).
  • Bump golang.org/x/image dependency version in module files.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
main.go Adds WebP MIME allowlisting and WebP decoding via golang.org/x/image/webp.
go.mod Updates the golang.org/x/image module version.
go.sum Records checksums for the updated golang.org/x/image module version.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread go.mod Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

Comment thread go.mod Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

3 participants