Using Playwright for screenshots? You don't need a test framework for that.
Playwright is a brilliant E2E testing tool. But if you're only using it to render HTML to images, you're paying for 95% of features you don't need — plus the browser binary, the flaky waits, and the CI setup overhead.
The overengineering trap
You wanted page.screenshot(). You got a test framework.
Playwright is a test framework, not a rendering service — you're using 5% of it
Browser binaries need npx playwright install in every CI/deploy
waitForLoadState / waitForSelector guessing game
Different rendering between Chromium, Firefox, WebKit versions
Flaky screenshots due to race conditions with fonts and images
Scaling means managing browser pools and concurrent contexts
Migration
Drop the browser. Keep the output.
Same HTML input. Same pixel-perfect image. No browser binary, no networkidle guessing, no font race conditions.
// Before: Playwright
// import { chromium } from 'playwright'
// const browser = await chromium.launch()
// const page = await browser.newPage()
// await page.setViewport({ width: 1200, height: 630 })
// await page.setContent(html)
// await page.waitForLoadState('networkidle')
// const buffer = await page.screenshot({ type: 'png' })
// await browser.close()
// After: RendShot
import { RendShot } from '@rendshot/sdk'
const client = new RendShot({ apiKey: process.env.RENDSHOT_API_KEY })
const image = await client.renderImage({
html,
width: 1200,
height: 630,
})
console.log(image.url) // CDN-hosted, fonts auto-loadedComparison
Playwright vs RendShot for image generation.
| Metric | Playwright | RendShot |
|---|---|---|
| Setup | npm i playwright + npx playwright install | npm i @rendshot/sdk |
| Binary size | ~280MB Chromium download | 0 (API only) |
| Cold start | 1-3s (browser launch) | 0s (pre-warmed pool) |
| P50 render time | ~600ms | ~400ms |
| Font handling | Manual install or waitForTimeout hacks | 50+ Google Fonts auto-loaded |
| Wait strategies | waitForLoadState, waitForSelector, arbitrary timeouts | Automatic — fonts + images resolved before render |
| CI/CD setup | Install browsers in every pipeline | Just an API key env var |
| Concurrent renders | Limited by browser contexts/RAM | 100 req/min (Pro) |
| CSS support | Full | Full (Tailwind, Grid, Flexbox) |
| JavaScript execution | Yes | No (HTML/CSS only) |
| Cross-browser testing | Yes (Chromium, Firefox, WebKit) | N/A (Chromium rendering only) |
Honest comparison
Keep Playwright for testing. Use RendShot for rendering.
You need E2E testing
Use PlaywrightPlaywright is the best E2E test framework. RendShot is a rendering API, not a test runner.
You need cross-browser screenshots
Use PlaywrightPlaywright supports Chromium + Firefox + WebKit. RendShot uses Chromium only.
You need page interaction before capture
Use PlaywrightClick, scroll, fill forms — Playwright does this. RendShot renders static HTML.
You render HTML to images in production
Use RendShotNo browser binary, no flaky waits, auto font loading, global CDN.
You generate images in CI/CD pipelines
Use RendShotNo npx playwright install. Just an API key. Works in any CI without browser deps.
FAQ
Migrating from Playwright screenshots
How is RendShot different from Playwright for screenshots?
Playwright is a browser automation framework designed for testing. RendShot is a purpose-built rendering API. For HTML-to-image, RendShot is simpler (no browser install, no wait strategies), faster (pre-warmed pool), and cheaper to operate (no server to host). For actual E2E testing, Playwright is the right tool.
Can I replace all Playwright screenshot usage with RendShot?
If you're using Playwright solely to render HTML/CSS to images (page.setContent + page.screenshot), yes — RendShot is a direct replacement. If you're navigating to live URLs that require JS execution, or doing visual regression testing, keep using Playwright for those use cases.
Do I need to install Chromium with RendShot?
No. RendShot is an API — you send HTML over HTTP and get back an image URL. No browser binary, no npx playwright install, no Docker image with Chromium. Your deploy stays lightweight.
How does RendShot handle font loading?
RendShot auto-loads 50+ Google Fonts. No more waitForTimeout(1000) hoping fonts have loaded. If you use custom fonts, reference them via CSS @font-face with a URL — RendShot fetches and renders them before capturing the image.
What about URL screenshots?
RendShot supports URL screenshots via POST /v1/screenshot. For public pages, it's a simpler alternative to launching a Playwright browser, navigating, and capturing. Private pages behind auth are not supported — use Playwright for those.
Drop the browser binary. Keep the pixels.
100 free renders to test your workflow. No Chromium download, no CI headaches.