[Feature]: Support compression effort option for WebP screenshots and visual regression
Los mantenedores suelen responder en 1 día
@yury-s ya está trabajando en esto.
Desde el 5/10/2026.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 55/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- typescript, wasm
- Área
- testing-qa
Línea de trabajo
Start by tracing WebP encoding for page.screenshot(), locator.screenshot(), and expect(page).toHaveScreenshot(), including the playwright.config.ts expect settings and bundled libwebp WASM module. Done means all listed APIs accept an integer effort from 0 to 6 with a default of 0, and lossless screenshots remain pixel-identical while supporting the requested compression setting.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
🚀 Feature Request
Add an effort option (integer from 0 to 6, defaulting to 0) for WebP screenshots across:
-
page.screenshot() -
locator.screenshot() -
expect(page).toHaveScreenshot()- Per assertion
- Via
playwright.config.ts
Example
playwright.config.ts
import { defineConfig } from '@playwright/test';
export default defineConfig({
expect: {
toHaveScreenshot: {
type: 'webp',
effort: 4, // Baseline snapshots encoded with method 4
},
},
});
Per screenshot / assertion
// Direct screenshot
await page.screenshot({
path: 'snapshot.webp',
type: 'webp',
effort: 6,
});
// Visual regression
await expect(page).toHaveScreenshot('landing.webp', {
effort: 4,
});
Motivation
WebP is already supported in Playwright for both direct screenshots and visual regression snapshots (toHaveScreenshot()). Lossless WebP snapshots can provide 20–30%+ file size reductions compared to PNG.
In libwebp, the compression effort (method, range 0–6) controls how intensively the encoder searches for spatial and entropy redundancies.
Because the compression is strictly lossless:
effort: 0andeffort: 6produce 100% pixel-identical RGBA buffers.effort: 0encodes quickly with minimal CPU usage, making it suitable for test-run screenshots and comparisons.effort: 4–6can significantly reduce file size, making it suitable for baseline/golden files committed to Git repositories.
Currently, Playwright's bundled libwebp WASM module does not expose the method parameter.
Adding this option would allow users to:
- Store smaller WebP baseline snapshots in their repositories and reduce repository bloat.
- Keep CI runs fast by generating comparison screenshots with
effort: 0while validating against high-effort baselines with zero pixel difference.
- Lenguaje dominante
- TypeScript
- Estrellas
- 100k
- Forks
- 6.9k
- Merge medio
- 16 h 8 min
- PR fusionados (30 d)
- 281
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoft/playwright
-
[MCP]: page snapshots in .playwright-mcp/ are not git-ignored (.playwright-cli/ is, since #42318)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
microsoft/playwright#44289 ·
Los mantenedores suelen responder en 1 día
-
agent-triage-done
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
microsoft/playwright#44264 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
[BUG] WebKit keeps every removed iframe's JS heap alive (memory grows until the page crashes)Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 12/100
microsoft/playwright#44290 ·
Los mantenedores suelen responder en 1 día
-
[Regression]: requestFullscreen() in a popup rejects with "not granted" in 1.65 (Chromium 159)Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 22/100
microsoft/playwright#44288 ·
Los mantenedores suelen responder en 1 día
-
[Bug]: page.goto never returns for a load started as a newer service worker takes over (Chromium)Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 12/100
microsoft/playwright#44287 ·
Los mantenedores suelen responder en 1 día
Todos los issues de microsoft/playwright
Issues similares
-
clawsweeper:needs-maintainer-review clawsweeper:needs-product-decision clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster P3
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
openclaw/openclaw#203385 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
nwverse/persona#12800 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
Los mantenedores suelen responder en 1 día
-
good first issue
Dificultad 2/5 Medio día Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
WISE-Community/WISE-Client#2404 ·
Los mantenedores suelen responder en 1 día