{
  "schemaVersion": 1,
  "contentVersion": "ca42e61ede0a24f789d7287a0001244ad22f4abf",
  "id": "docs/codecs/images/webp",
  "collection": "docs",
  "title": "WebP",
  "description": "WebP is Google's image format with lossy and lossless modes, alpha and animation, supported everywhere on the web though newer formats compress better.",
  "canonicalUrl": "https://encode.wiki/codecs/images/webp/",
  "apiUrl": "https://encode.wiki/api/v1/documents/docs/codecs/images/webp.json",
  "markdownUrl": "https://encode.wiki/api/v1/markdown/docs/codecs/images/webp.md",
  "status": "current",
  "tags": [
    "migrated",
    "images",
    "webp"
  ],
  "license": "CC BY-SA 4.0",
  "dates": {
    "lastVerified": "2026-10-08T00:00:00.000Z"
  },
  "authors": [],
  "sources": [
    {
      "title": "libwebp v1.6.0 source",
      "url": "https://github.com/webmproject/libwebp/tree/v1.6.0",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "cwebp documentation",
      "url": "https://developers.google.com/speed/webp/docs/cwebp",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "RFC 9649 WebP Image Format",
      "url": "https://www.rfc-editor.org/rfc/rfc9649",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "WebP lossless and alpha study",
      "url": "https://developers.google.com/speed/webp/docs/webp_lossless_alpha_study",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "MDN browser compatibility data for WebP",
      "url": "https://github.com/mdn/browser-compat-data/blob/main/mediatypes/image/webp.json",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    }
  ],
  "provenance": {
    "originUrl": "https://github.com/av1-community-contributors/codec-wiki/blob/37c3317fd058b23c71a87679bed5619a98f77752/docs/images/WebP.mdx",
    "originCommit": "37c3317fd058b23c71a87679bed5619a98f77752",
    "migratedAt": "2026-08-21T00:00:00.000Z",
    "modified": true,
    "originPath": "docs/images/WebP.mdx"
  },
  "headings": [
    {
      "depth": 2,
      "text": "Strengths and weaknesses",
      "anchor": "strengths-and-weaknesses"
    },
    {
      "depth": 2,
      "text": "Support",
      "anchor": "support"
    },
    {
      "depth": 2,
      "text": "Encode with cwebp",
      "anchor": "encode-with-cwebp"
    },
    {
      "depth": 3,
      "text": "Metadata and colour",
      "anchor": "metadata-and-colour"
    },
    {
      "depth": 3,
      "text": "Animation",
      "anchor": "animation"
    },
    {
      "depth": 2,
      "text": "Pitfalls",
      "anchor": "pitfalls"
    },
    {
      "depth": 2,
      "text": "Related pages",
      "anchor": "related-pages"
    },
    {
      "depth": 2,
      "text": "Full option reference",
      "anchor": "full-option-reference"
    },
    {
      "depth": 2,
      "text": "cwebp parameter reference",
      "anchor": "cwebp-parameter-reference"
    },
    {
      "depth": 2,
      "text": "img2webp parameter reference",
      "anchor": "img2webp-parameter-reference"
    },
    {
      "depth": 2,
      "text": "gif2webp parameter reference",
      "anchor": "gif2webp-parameter-reference"
    }
  ],
  "sections": [
    {
      "id": "_preamble",
      "title": "Page introduction",
      "depth": 0,
      "canonicalUrl": "https://encode.wiki/codecs/images/webp/",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/codecs/images/webp/_preamble.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/codecs/images/webp/_preamble.md",
      "checksum": "822ca3e0a3ecb59470137c58a36ef5f193ce4f91142ecc350f67ec48b3b48de2",
      "bytes": 804
    },
    {
      "id": "strengths-and-weaknesses",
      "title": "Strengths and weaknesses",
      "depth": 2,
      "anchor": "strengths-and-weaknesses",
      "canonicalUrl": "https://encode.wiki/codecs/images/webp/#strengths-and-weaknesses",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/codecs/images/webp/strengths-and-weaknesses.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/codecs/images/webp/strengths-and-weaknesses.md",
      "checksum": "1d4e3f04aa5267aaca616a44d08c6d47bb9d556b4420b7bb7654bdc48e0830e5",
      "bytes": 1084
    },
    {
      "id": "support",
      "title": "Support",
      "depth": 2,
      "anchor": "support",
      "canonicalUrl": "https://encode.wiki/codecs/images/webp/#support",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/codecs/images/webp/support.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/codecs/images/webp/support.md",
      "checksum": "ed3fea6955f3d06710e471af09664f7a76d8b119ed88261daa56df17f4fa0be9",
      "bytes": 889
    },
    {
      "id": "encode-with-cwebp",
      "title": "Encode with cwebp",
      "depth": 2,
      "anchor": "encode-with-cwebp",
      "canonicalUrl": "https://encode.wiki/codecs/images/webp/#encode-with-cwebp",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/codecs/images/webp/encode-with-cwebp.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/codecs/images/webp/encode-with-cwebp.md",
      "checksum": "c507d25af1e0bb2934ed01e05240d42cab112adfe5413524eca0840f60b47ca1",
      "bytes": 3569
    },
    {
      "id": "metadata-and-colour",
      "title": "Metadata and colour",
      "depth": 3,
      "anchor": "metadata-and-colour",
      "canonicalUrl": "https://encode.wiki/codecs/images/webp/#metadata-and-colour",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/codecs/images/webp/metadata-and-colour.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/codecs/images/webp/metadata-and-colour.md",
      "checksum": "25722e548277355ca6c87246d2e3c598bf709dc5cfdea809f818e48e25425629",
      "bytes": 429
    },
    {
      "id": "animation",
      "title": "Animation",
      "depth": 3,
      "anchor": "animation",
      "canonicalUrl": "https://encode.wiki/codecs/images/webp/#animation",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/codecs/images/webp/animation.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/codecs/images/webp/animation.md",
      "checksum": "d69308c804eb1173817010446003262713d8a931245f9626175f94d887fa186e",
      "bytes": 642
    },
    {
      "id": "pitfalls",
      "title": "Pitfalls",
      "depth": 2,
      "anchor": "pitfalls",
      "canonicalUrl": "https://encode.wiki/codecs/images/webp/#pitfalls",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/codecs/images/webp/pitfalls.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/codecs/images/webp/pitfalls.md",
      "checksum": "8d953e6415e4f62bdcbb0d6284a8e1122621cfb175626e91b69847cd7a04d46f",
      "bytes": 592
    },
    {
      "id": "related-pages",
      "title": "Related pages",
      "depth": 2,
      "anchor": "related-pages",
      "canonicalUrl": "https://encode.wiki/codecs/images/webp/#related-pages",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/codecs/images/webp/related-pages.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/codecs/images/webp/related-pages.md",
      "checksum": "4659ee8fc32c2e67bcfdbf8818602e385ada3b3c4f46c3f067eb2c0f443a88f2",
      "bytes": 299
    },
    {
      "id": "full-option-reference",
      "title": "Full option reference",
      "depth": 2,
      "anchor": "full-option-reference",
      "canonicalUrl": "https://encode.wiki/codecs/images/webp/#full-option-reference",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/codecs/images/webp/full-option-reference.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/codecs/images/webp/full-option-reference.md",
      "checksum": "0b16573c1a233792dcaa994f65221979d1dc8606a73c978081242284ebce33d5",
      "bytes": 219
    },
    {
      "id": "cwebp-parameter-reference",
      "title": "cwebp parameter reference",
      "depth": 2,
      "anchor": "cwebp-parameter-reference",
      "canonicalUrl": "https://encode.wiki/codecs/images/webp/#cwebp-parameter-reference",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/codecs/images/webp/cwebp-parameter-reference.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/codecs/images/webp/cwebp-parameter-reference.md",
      "checksum": "b1928beac4982d70da49b58a8980b4cd66117ef3104e50e1a4eec8b056b9e1c0",
      "bytes": 8661
    },
    {
      "id": "img2webp-parameter-reference",
      "title": "img2webp parameter reference",
      "depth": 2,
      "anchor": "img2webp-parameter-reference",
      "canonicalUrl": "https://encode.wiki/codecs/images/webp/#img2webp-parameter-reference",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/codecs/images/webp/img2webp-parameter-reference.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/codecs/images/webp/img2webp-parameter-reference.md",
      "checksum": "bb221194aedee74419a95a9367b083d17c14fa81823cd6e9f4f0eb0b4cd003ee",
      "bytes": 3298
    },
    {
      "id": "gif2webp-parameter-reference",
      "title": "gif2webp parameter reference",
      "depth": 2,
      "anchor": "gif2webp-parameter-reference",
      "canonicalUrl": "https://encode.wiki/codecs/images/webp/#gif2webp-parameter-reference",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/codecs/images/webp/gif2webp-parameter-reference.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/codecs/images/webp/gif2webp-parameter-reference.md",
      "checksum": "15f49ebdebe576a35fb088336c9e32dbc1dec5b6791ec960fed059d51bab4405",
      "bytes": 3091
    }
  ],
  "outboundReferences": [
    "/codecs/images/avif/",
    "/codecs/images/jpeg/",
    "/codecs/images/jxl/",
    "/codecs/images/png/",
    "/codecs/video/vp8/",
    "/reference/encoder-parameters/",
    "/reference/image-audio-support/",
    "https://developers.google.com/speed/webp/docs/webp_lossless_alpha_study",
    "https://github.com/mdn/browser-compat-data/blob/main/mediatypes/image/webp.json",
    "https://github.com/webmproject/libwebp",
    "https://www.cve.org/CVERecord?id=CVE-2023-4863",
    "https://www.rfc-editor.org/rfc/rfc9649"
  ],
  "checksum": "d3bd35de57e2e0f1a0483a3621edd5782bae0682247e4c95a24279f3fc43ccca",
  "contentFormat": "markdown",
  "markdown": "WebP is Google's image format from 2010: a lossy mode derived from the [VP8](/codecs/video/vp8/) video codec, a separate lossless mode (VP8L) added in 2011, and an extended container with alpha, animation, ICC profiles and Exif/XMP metadata. It is standardised as [RFC 9649](https://www.rfc-editor.org/rfc/rfc9649) (informational, 2024) and implemented by Google's [libwebp](https://github.com/webmproject/libwebp), which provides `cwebp`, `dwebp`, `img2webp`, `gif2webp` and `webpmux`.\n\nIts appeal today is compatibility: every current browser, OS image framework and image library decodes it, and it encodes quickly. Newer formats ([AVIF](/codecs/images/avif/), [JPEG XL](/codecs/images/jxl/)) compress better, but WebP is a safe default for web delivery, for transparent images and for replacing GIF.\n\n## Strengths and weaknesses\n\n**Strengths**\n\n- Lossy files noticeably smaller than JPEG at similar visual quality in most cases, with alpha available in lossy files too.\n- A lossless mode that is clearly smaller than PNG: on Google's [web-image corpus](https://developers.google.com/speed/webp/docs/webp_lossless_alpha_study) about 40 % smaller than plain libpng output and about 20 % smaller than ZopfliPNG-optimised PNG.\n- Animation with 24-bit colour and alpha, and per-frame lossy or lossless coding. Animated WebP is usually considerably smaller than GIF.\n- Universal support, fast encoding and decoding, royalty-free.\n\n**Weaknesses**\n\n- Lossy WebP is **8-bit 4:2:0 only**. There is no 4:4:4 or 10-bit lossy mode and no HDR, so saturated red/blue edges and coloured text bleed, and gradients can band.\n- Maximum 16,383 × 16,383 pixels in each direction.\n- The lossy format is based on VP8 and tends to smooth fine texture; it is clearly less efficient than AVIF or JPEG XL.\n- No JPEG-style progressive decode.\n- Lossless is 8-bit RGBA only; for 16-bit images use PNG or JPEG XL.\n\n## Support\n\n| Browser            | WebP                                                                       |\n| ------------------ | -------------------------------------------------------------------------- |\n| Chrome             | 17+ (lossless and alpha from 23, animation from 32)                        |\n| Edge               | 18+                                                                        |\n| Firefox            | 65+                                                                        |\n| Safari / iOS Safari| 14+                                                                        |\n\n(From [MDN's WebP data](https://github.com/mdn/browser-compat-data/blob/main/mediatypes/image/webp.json).) That covers every browser still in use. Older software and some editors and apps are the remaining gaps. See [image and audio support](/reference/image-audio-support/).\n\n## Encode with cwebp\n\n`cwebp` reads PNG, JPEG, TIFF, WebP and PNM.\n\n```sh\ncwebp -q 80 -m 6 input.png -o output.webp\n```\n\n`-q` is 0–100 (default 75); the scale is not JPEG's, so compare by eye. `-m 6` is the slowest, best compression method (default 4) and is worth it unless you are encoding enormous batches. Add `-mt` to use several threads.\n\n| Goal                                  | Command                                                  | Notes                                                                                      |\n| ------------------------------------- | -------------------------------------------------------- | ------------------------------------------------------------------------------------------ |\n| Photo                                 | `cwebp -q 80 -m 6 in.png -o out.webp`                    | `-preset photo`, `picture`, `drawing`, `icon` and `text` tune the encoder for the content type; the preset must come first.                          |\n| Sharper colour edges                  | add `-sharp_yuv`                                         | Slower, more careful RGB→YUV 4:2:0 conversion; helps red text and thin coloured lines.     |\n| Lossless                              | `cwebp -lossless -z 9 in.png -o out.webp`                | `-z 0`–`9` is the lossless effort preset (`-z` implies `-lossless`); 9 is slowest and smallest. |\n| Lossless with a little loss           | `cwebp -near_lossless 60 -z 9 in.png -o out.webp`        | `-near_lossless 0..100`: 100 is off; lower is lossier. Still the lossless codec, so graphics compress better with no visible change. |\n| Smaller alpha                         | `cwebp -q 80 -alpha_q 80 in.png -o out.webp`             | Alpha is coded separately and is lossless by default (`-alpha_q 100`); lower it to shrink soft masks. |\n| Keep hidden RGB under transparency    | add `-exact`                                             | By default `cwebp` is free to change colours of fully transparent pixels to compress better. |\n| Hit a size                            | `cwebp -size 50000 in.png -o out.webp`                   | Searches quality for a target byte size. `-psnr 42` targets a PSNR instead.               |\n| Resize while encoding                 | `cwebp -resize 1280 0 -q 80 in.png -o out.webp`          | 0 keeps the aspect ratio.                                                                  |\n\nWith `-lossless`, `-q` no longer sets quality; it behaves as effort. Use `-z` instead.\n\n### Metadata and colour\n\n`cwebp` writes **no metadata by default**, including ICC profiles. Wide-gamut images will look desaturated if you drop their profile, so pass `-metadata icc` (or `-metadata all` for Exif, XMP and ICC) when the source has one. `cwebp` does not apply Exif orientation to the pixels, so a rotated phone photo converted with the default `-metadata none` comes out sideways; rotate it first or keep the Exif.\n\n### Animation\n\n```sh\ngif2webp -lossy -q 70 -m 6 input.gif -o output.webp\nimg2webp -loop 0 -lossy -q 70 -d 100 frame1.png frame2.png frame3.png -o animation.webp\n```\n\n`gif2webp` is lossless unless you add `-lossy` or `-mixed` (per-frame choice); `-min_size` searches for the smallest result. `img2webp` takes explicit frame lists with a per-frame `-d` duration in milliseconds and per-frame `-lossy`/`-lossless`/`-q`. For video clips, [AVIF](/codecs/images/avif/) animations or a real video format are much smaller. `webpmux` edits and inspects frames and chunks. `dwebp` only decodes still images; use `anim_dump` or a viewer for animations.\n\n## Pitfalls\n\n- Lossless is for graphics, screenshots and masters. A lossless WebP of a photograph is several times the size of a lossy one.\n- `-q 100` is lossy, not lossless; use `-lossless`.\n- The 16,383-pixel limit applies in both modes; downscale or split larger images first.\n- WebP files fed from lossy JPEGs compound loss; encode from the original where possible.\n- libwebp's lossless decoder had a heap overflow, [CVE-2023-4863](https://www.cve.org/CVERecord?id=CVE-2023-4863), that was exploited in the wild in 2023. If you embed libwebp to decode untrusted uploads, keep it current.\n\n## Related pages\n\n- [AVIF](/codecs/images/avif/) and [JPEG XL](/codecs/images/jxl/) compress better and support more bit depths.\n- [JPEG](/codecs/images/jpeg/) and [PNG](/codecs/images/png/) are the formats WebP most often replaces.\n- [VP8](/codecs/video/vp8/) is the video codec behind lossy WebP.\n\n## Full option reference\n\nThe tables below are the full parameter references for `cwebp`, `img2webp` and `gif2webp` in libwebp 1.6.0. [Reading option tables](/reference/encoder-parameters/) explains the Default column.\n\n## cwebp parameter reference\n\n<details>\n<summary>Complete cwebp 1.6.0 options and defaults</summary>\n\n| Parameter and aliases | Type / accepted values         | Default                             | Meaning and limits                                                                                                                       |\n| --------------------- | ------------------------------ | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |\n| `-preset`             | enum                           | default                             | Start from a tuned set (default, photo, picture, drawing, icon, text); resets other options, so put it first. |\n| `-q`                  | float 0–100                    | 75                                  | Lossy quality 0–100, or lossless effort with -lossless. Disables -z. |\n| `-m`                  | integer 0–6                    | 4                                   | Speed/size trade-off, 0 fast to 6 slowest and smallest. Disables -z. |\n| `-z`                  | integer 0–9                    | not enabled                         | Lossless preset 0 (fast) to 9 (slowest); implies -lossless and is ignored if -q or -m is given. |\n| `-lossless`           | switch                         | off                                 | Encode with lossless VP8L instead of lossy VP8. |\n| `-near_lossless`      | integer 0–100                  | 100 (no preprocessing)              | Lossless with pixel preprocessing: 100 is off, lower values discard more detail for smaller files. |\n| `-hint`               | enum                           | default                             | Content hint for lossless coding: photo, picture or graph. |\n| `-alpha_q`            | integer 0–100                  | 100                                 | Alpha-plane quality 0–100; below 100 makes alpha lossy, independent of -q. |\n| `-alpha_method`       | integer 0–1                    | 1                                   | Alpha compression: 0 stores it raw, 1 uses lossless coding. |\n| `-alpha_filter`       | enum                           | fast                                | Alpha-plane prediction filter: none, fast or best. |\n| `-exact`              | switch                         | off                                 | Keep RGB values under fully transparent pixels instead of zeroing them. |\n| `-alpha_cleanup`      | switch                         | off (-exact is off)                 | Hidden obsolete flag that turns -exact off; has no other effect. |\n| `-noalpha`            | switch                         | off                                 | Discard the alpha channel. |\n| `-blend_alpha`        | hex RGB                        | not enabled                         | Composite onto a hex RGB background (e.g. 0xffffff) and drop transparency. |\n| `-segments`           | integer 1–4                    | 4                                   | Number of VP8 segments, 1–4; fewer is faster but less adaptive. |\n| `-sns`                | integer 0–100                  | 50                                  | Spatial noise shaping 0–100; higher spends bits on perceptually important areas. |\n| `-f`                  | integer 0–100                  | 60                                  | Loop-filter strength 0–100; 0 turns filtering off. |\n| `-sharpness`          | integer 0–7                    | 0                                   | Loop-filter sharpness 0 (most smoothing) to 7 (least). |\n| `-strong`             | switch                         | on                                  | Use the strong loop filter, which also filters chroma. |\n| `-nostrong`           | switch                         | off                                 | Use the simple loop filter, which is faster. |\n| `-sharp_yuv`          | switch                         | off                                 | Slower RGB-to-YUV conversion that preserves sharp color edges better. |\n| `-partition_limit`    | integer 0–100                  | 0                                   | Allow quality loss 0–100 so the first partition fits its 512 KiB limit. |\n| `-size`               | nonnegative integer bytes      | 0 (no target)                       | Target output size in bytes (lossy only); approximate. Raises -pass from 1 to 6. |\n| `-psnr`               | nonnegative float dB           | 0 (no target)                       | Target PSNR in dB (around 42 is typical); overrides -size. Lossy only. |\n| `-pass`               | integer 1–10                   | 1; becomes 6 for a size/PSNR target | Analysis passes 1–10 for size or PSNR targeting; more is slower and closer to target. |\n| `-qrange`             | two integers                   | 0 100                               | Limit the quality search to MIN MAX within 0–100. |\n| `-af`                 | switch                         | off                                 | Experimental: adjust filter strength automatically. |\n| `-jpeg_like`          | switch                         | off                                 | Experimental: remap parameters so output size roughly matches JPEG's, with less degradation. |\n| `-pre`                | integer bitfield 0–7           | 0                                   | Experimental preprocessing bits: 1 segment smoothing, 2 dithering, 4 sharp YUV conversion. |\n| `-mt` | switch | off | Use multithreading where available. |\n| `-low_memory`         | switch                         | off                                 | Use less memory at the cost of speed. |\n| `-s`                  | two positive integers          | not specified                       | Declare raw YUV420 input of WIDTH HEIGHT; not a resize. |\n| `-crop`               | four integers x y width height | not enabled                         | Crop to X Y WIDTH HEIGHT before any resize. |\n| `-resize`             | two nonnegative integers       | not enabled                         | Resize to WIDTH HEIGHT after cropping; a zero dimension keeps the aspect ratio. |\n| `-resize_mode`        | enum                           | always                              | When -resize applies: always, up_only or down_only. |\n| `-metadata`           | comma-separated tokens         | none                                | Copy metadata from the input: all, none, exif, icc, xmp (comma-separated). |\n| `-o`                  | path                           | none (encode without saving)        | Output file; - writes to stdout. |\n| `-d`                  | PGM path                       | not enabled                         | Write the decoded result of the lossy encode to a PGM file for inspection. |\n| `-map`                | integer                        | not enabled                         | Print a diagnostic map of encoder statistics; debugging only. |\n| `-print_psnr`         | switch                         | off                                 | Print PSNR of the encoded result against the source. |\n| `-print_ssim`         | switch                         | off                                 | Print SSIM of the encoded result against the source. |\n| `-print_lsim`         | switch                         | off                                 | Print local-similarity score of the encoded result. |\n| `-short`              | switch                         | off                                 | Print a condensed statistics summary. |\n| `-quiet`              | switch                         | off                                 | Print nothing. |\n| `-v`                  | switch                         | off                                 | Print timing and extra diagnostics. |\n| `-progress`           | switch                         | off                                 | Print encoding progress as a percentage. |\n| `-noasm`              | switch                         | off                                 | Disable assembly optimizations (SSE, NEON); for debugging. |\n| `-h`, `-help`         | action                         | not requested                       | Print the short help. |\n| `-H`, `-longhelp`     | action                         | not requested                       | Print the full help. |\n| `-version`            | action                         | not requested                       | Print the library and libsharpyuv versions, then exit. |\n| `--`                  | action                         | not requested                       | Treat the next argument as the input file and stop parsing options. |\n\n</details>\n\n## img2webp parameter reference\n\n<details>\n<summary>Complete img2webp 1.6.0 options and defaults</summary>\n\n| Parameter and aliases | Type / accepted values        | Default                      | Meaning and limits                                                                                                   |\n| --------------------- | ----------------------------- | ---------------------------- | -------------------------------------------------------------------------------------------------------------------- |\n| `-o`                  | path                          | none (encode without saving) | Output animation file; - writes to stdout. |\n| `-loop`               | nonnegative integer           | 0 (infinite)                 | Animation loop count; 0 loops forever. |\n| `-min_size`           | switch                        | off                          | Spend more time to minimize size; disables inserted keyframes. |\n| `-kmin`               | integer                       | 2147483646                   | Minimum frames between keyframes; the default effectively disables inserted keyframes. |\n| `-kmax`               | integer                       | 2147483647                   | Maximum frames between keyframes; 1 makes every frame a keyframe, 0 or less disables inserted ones. |\n| `-mixed`              | switch                        | off                          | Pick lossy or lossless per frame automatically; per-frame -lossy and -lossless are then ignored. |\n| `-near_lossless`      | integer 0–100                 | 100 (no preprocessing)       | Near-lossless preprocessing 0–100 for lossless frames; 100 is off. |\n| `-sharp_yuv`          | switch                        | off                          | Slower RGB-to-YUV conversion with better edges, for lossy frames. |\n| `-v`                  | switch                        | off                          | Print frame order and timestamps. |\n| `-h`, `-help`         | action                        | not requested                | Print help. |\n| `-version`            | action                        | not requested                | Print encoder, mux and libsharpyuv versions, then exit. |\n| `-d`                  | positive integer milliseconds | 100                          | Display time in milliseconds for this and following frames. |\n| `-lossless`           | switch                        | on                           | Encode following frames losslessly (the default). |\n| `-lossy`              | switch                        | off                          | Encode following frames lossily. |\n| `-q`                  | float 0–100                   | 75                           | Quality 0–100 for following frames; lossless effort when lossless. |\n| `-m`                  | integer 0–6                   | 4                            | Speed/size trade-off 0–6 for following frames; 6 is slowest and smallest. |\n| `-exact`              | switch                        | off                          | Keep RGB under transparent pixels in following frames; compositing can still discard it. |\n| `-noexact`            | switch                        | on                           | Allow following frames to zero RGB under transparent pixels (the default). |\n\n</details>\n\n## gif2webp parameter reference\n\n<details>\n<summary>Complete gif2webp 1.6.0 options and defaults</summary>\n\n| Parameter and aliases | Type / accepted values | Default                      | Meaning and limits                                                                                       |\n| --------------------- | ---------------------- | ---------------------------- | -------------------------------------------------------------------------------------------------------- |\n| `-o`                  | path                   | none (encode without saving) | Output WebP file; - writes to stdout. |\n| `-lossy`              | switch                 | off                          | Encode lossy instead of the default lossless. |\n| `-mixed`              | switch                 | off                          | Pick lossy or lossless per frame automatically. |\n| `-near_lossless`      | integer 0–100          | 100 (no preprocessing)       | Near-lossless preprocessing 0–100 for lossless frames; 100 is off. |\n| `-sharp_yuv`          | switch                 | off                          | Slower RGB-to-YUV conversion with better edges, for lossy frames. |\n| `-q`                  | float 0–100            | 75                           | Lossy quality 0–100, or lossless effort. |\n| `-m`                  | integer 0–6            | 4                            | Speed/size trade-off 0–6; 6 is slowest and smallest. |\n| `-min_size`           | switch                 | off                          | Spend more time to minimize size; disables inserted keyframes. |\n| `-kmin`               | integer                | 9 lossless; 3 lossy/mixed    | Minimum frames between keyframes; libwebp may adjust inconsistent kmin/kmax pairs. |\n| `-kmax`               | integer                | 17 lossless; 5 lossy/mixed   | Maximum frames between keyframes; 1 makes every frame a keyframe, 0 or less disables inserted ones. |\n| `-f`                  | integer 0–100          | 60                           | Loop-filter strength 0–100 for lossy frames. |\n| `-metadata`           | comma-separated tokens | xmp                          | Copy ICC and XMP from the GIF: all, none, icc, xmp (comma-separated). |\n| `-loop_compatibility` | switch                 | off                          | Legacy loop-count handling for Chrome 62 and earlier; skips the GIF-to-WebP count adjustment. |\n| `-mt` | switch | off | Use multithreading where available. |\n| `-v`                  | switch                 | off                          | Print conversion and mux diagnostics. |\n| `-quiet`              | switch                 | off                          | Print nothing. |\n| `-h`, `-help`         | action                 | not requested                | Print help. |\n| `-version`            | action                 | not requested                | Print encoder, mux and libsharpyuv versions, then exit. |\n| `--`                  | action                 | not requested                | Treat the next argument as the input GIF and stop parsing options. |\n\n</details>\n"
}
