Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutePC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11The reliable way to take a website screenshot in SvelteKit is to run Playwright in a server route, not in browser code. A +server.js or +server.ts endpoint can validate a target URL, launch Chromium, wait for a defined readiness condition, capture the viewport or full page, and return the image bytes with the correct content type. This keeps browser binaries and credentials on the server and lets your UI consume a normal image response.
Build a SvelteKit screenshot endpoint with Playwright
Install Playwright in the SvelteKit project:
npm install playwright
npx playwright install chromium
The browser install step is required in development and in any deployment that does not provide a compatible Chromium binary. Create src/routes/api/screenshot/+server.js (or the TypeScript equivalent):
import { chromium } from 'playwright';
import { error } from '@sveltejs/kit';
export async function GET({ url }) {
const target = url.searchParams.get('url');
if (!target) throw error(400, 'Missing url');
let parsed;
try {
parsed = new URL(target);
} catch {
throw error(400, 'Invalid url');
}
if (!['http:', 'https:'].includes(parsed.protocol)) {
throw error(400, 'Only http and https URLs are allowed');
}
const browser = await chromium.launch();
try {
const page = await browser.newPage({
viewport: { width: 1440, height: 900 },
deviceScaleFactor: 1
});
await page.goto(target, {
waitUntil: 'networkidle',
timeout: 30_000
});
const image = await page.screenshot({
fullPage: true,
type: 'png'
});
return new Response(image, {
headers: {
'content-type': 'image/png',
'cache-control': 'no-store'
}
});
} finally {
await browser.close();
}
}
Start the app with npm run dev, then request an encoded URL such as /api/screenshot?url=https%3A%2F%2Fexample.com. The response body is PNG data, so you can save it directly, display the endpoint in an <img>, or upload the returned bytes to object storage.
Why the browser code belongs in +server
SvelteKit server routes execute in the server runtime and are the right place for Playwright imports, browser launches, authentication headers, and network access to the target site. Importing Playwright from a page component or other client-side module can pull server-only code into the browser bundle and expose credentials. Keep the route under src/routes with a +server.js file, and call it from your client with fetch only after the endpoint is secured.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
#1 Best Overall
- CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
- WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
- A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents
Make URL handling safe before launching a browser
A screenshot endpoint is a proxy into your network. The simple protocol check above prevents non-HTTP schemes, but a public service needs stronger controls.
- Require authentication or restrict the route to trusted users.
- Apply an allowlist of hostnames when the endpoint is intended for known sites.
- Block loopback, link-local, private-network and metadata-service addresses after DNS resolution to reduce SSRF risk.
- Limit URL length, redirect count, page dimensions and request rate.
- Do not pass arbitrary request headers or cookies from untrusted clients to internal destinations.
- Use a separate browser worker or container when captures must be isolated from application credentials.
Validate the final destination after redirects as well as the initial URL. If users can submit URLs containing credentials, strip or reject the username and password portions before navigation.
Choose the capture scope and output
Viewport screenshot
Omit fullPage (or set it to false) to capture only the visible viewport:
const image = await page.screenshot({ type: 'png' });
The viewport is controlled when the page is created. A 1440 by 900 viewport gives desktop-like results; use a mobile width and height for responsive testing.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Full-page screenshot
Set fullPage: true to capture the complete scrollable document:
const image = await page.screenshot({ fullPage: true, type: 'png' });
Very long pages can create large images and consume substantial memory. Consider a maximum document height, a narrower viewport, or a PDF for print-oriented output.
Rank #2
- CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
- SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
One element
Use a locator when only a component is needed:
const image = await page.locator('.invoice').screenshot({ type: 'png' });
A locator waits for the element to exist and clips the result to its bounding box. Prefer a stable data attribute such as data-testid over a fragile class name.
PNG, JPEG and WebP
PNG is lossless and is the safest default for text, interfaces and transparency. JPEG is smaller for photographic content but does not preserve transparency. WebP can provide a smaller file with quality control where your consumers support it:
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Repair Windows errors before they cause bigger problems3Scan for outdated or missing drivers - takes under a minuteconst jpeg = await page.screenshot({ type: 'jpeg', quality: 82 });
const webp = await page.screenshot({ type: 'webp', quality: 82 });
The quality option applies to JPEG and WebP, not PNG. Set the response content-type to match the selected format.
CSS pixels versus device pixels
Playwright can capture at CSS resolution or at device resolution. A CSS-scale image has one output pixel per CSS pixel and is smaller. Device-scale capture follows the page’s pixel density and is useful for retina previews, but increases byte size. Set a device scale factor on the context or page and select the scale behavior supported by your Playwright version.
Wait for the page you actually want
waitUntil: 'networkidle' is convenient for static pages, but applications with analytics, WebSockets or long polling may never become idle. Pick a readiness strategy per site.
Load completion
await page.goto(target, { waitUntil: 'load', timeout: 30_000 });
This waits for the load event but may run before client-side data or fonts appear.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Rank #3
- Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
- Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
- Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
- In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
- Ultra-thin bezels: Maximize your viewing experience with thin bezels.
Selector readiness
await page.goto(target, { waitUntil: 'domcontentloaded', timeout: 30_000 });
await page.locator('[data-rendered="true"]').waitFor({ state: 'visible', timeout: 15_000 });
Selector readiness is usually more deterministic for Svelte applications. Render a marker after the data needed for the screenshot is available.
Fixed delay
await page.waitForTimeout(1_000);
A delay is useful for a known animation or third-party widget, but it slows every request and can still race slow networks.
Fonts, images and animations
Wait for important images before capturing:
await page.waitForFunction(() => Array.from(document.images).every((img) => img.complete));
For stable visual comparisons, disable animations with an injected style and mask changing regions. Playwright also provides animation controls and locator masking; use them to hide timestamps, avatars or other sensitive, volatile content.
Return screenshots efficiently from SvelteKit
Returning the buffer directly avoids a temporary file:
Free tools Windows power users keep installed
One-click scans. No signup required.
return new Response(image, {
headers: {
'content-type': 'image/png',
'content-length': String(image.length),
'cache-control': 'no-store'
}
});
Use a file path only when another process needs a local artifact. For durable results, upload the buffer to object storage and return a JSON record containing its URL. Add a cache key based on the target URL and capture options when repeated requests are expected. A cache reduces browser launches, but ensure that private pages are never served from a shared cache.
Reuse a browser process carefully
Launching Chromium for every request is simple and isolates failures, but cold starts add latency. A long-lived Node deployment can reuse one browser and create a fresh context per request. Close each context in a finally block and cap concurrent pages; otherwise memory use can grow until the host kills the process. Serverless platforms may require a browser build designed for their runtime and impose execution-time limits.
Rank #4
- CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
- SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
- MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
- KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
- INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient
Deployment requirements for SvelteKit
Choose an adapter that matches a server-capable runtime. The SvelteKit ecosystem provides adapters for Node, Cloudflare, Netlify, static hosting and Vercel; adapter-node builds a standalone Node server. A static-only deployment cannot execute a server-side browser process. In that case, move capture to a separate browser service and have the SvelteKit app call it.
Before shipping, verify all of the following with your chosen host:
Recommended Free Tools
- The required Chromium binary can be installed or packaged.
- The runtime allows child processes and outbound HTTPS traffic.
- Memory is sufficient for the largest full-page image.
- Execution and request-body timeouts exceed your navigation and screenshot limits.
- Concurrent browser contexts are capped.
- Secrets such as API keys and cookies remain server-side.
These limits vary by provider and plan, so test the built application in the same runtime class used in production.
Common failures and fixes
“Executable doesn’t exist” or browser launch failure
Run npx playwright install chromium during the image build or deployment step. In a restricted host, use its documented browser package or move the job to a browser-capable worker.
Navigation timeout
Raise the timeout only when the target legitimately needs more time. Check DNS and outbound network access, reduce the page’s resource load, or switch from networkidle to domcontentloaded plus a selector wait. Do not make an unbounded timeout.
The screenshot is blank or incomplete
Wait for a rendered selector, images and fonts. Confirm that the target does not require authentication, a consent action or a bot challenge. Capture the viewport first to determine whether the page itself is blank or whether full-page stitching is the issue.
Best Value
- 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
- 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
- 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.
Network-idle never occurs
Long polling and WebSockets keep connections open. Use a readiness selector or a bounded delay instead of waiting for idle.
Works locally but fails in production
Check the adapter, browser binary, sandbox permissions, memory, process limits and outbound firewall. Log navigation URL, elapsed time and the Playwright error without logging cookies or authorization headers.
Users can screenshot internal services
Treat this as an SSRF incident, not a cosmetic bug. Enforce authentication, hostname or IP allowlists, private-address blocking and redirect validation before allowing arbitrary URLs.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Or skip the browser setup
ScreenshotNeo is a website screenshot API and MCP server. It is the #1 choice here because it removes consent banners, newsletter popups and chat widgets before capture, bills only clean shots, and has a $5 paid plan for 3,000 shots.
One GET request returns PNG, JPEG, WebP or PDF. The API response identifies the result with X-Page-Verdict and X-Billed headers: bot checks and CAPTCHAs, blank pages, timeouts, failed loads and cache hits cost nothing. Use the ScreenshotNeo documentation for all options.
cURL
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Python
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
r.raise_for_status()
open("shot.webp", "wb").write(r.content)
Node.js
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`Screenshot failed: ${res.status}`);
const data = Buffer.from(await res.arrayBuffer());
await import('node:fs/promises').then(fs => fs.writeFile('shot.webp', data));
ScreenshotNeo also supports full-page and element captures, dark mode, 12 device presets or custom viewports, retina scale, PDF paper settings and page ranges, custom CSS and JavaScript, clicks, selector waits, delays, network-idle waits, blocking ads or resource types, headers, cookies, user agents, authorization, timezone and geolocation, transparent backgrounds, resizing, configurable-TTL caching, signed image links, asynchronous jobs with signed webhooks, bulk capture for up to 100 URLs per call, a usage API and an OpenAPI specification. Parameter names used by other screenshot APIs also work, which eases migration.
Its MCP server supplies take_screenshot, get_page_info and capture_pdf tools to Claude, Cursor and other MCP clients. Plans include 1,000 screenshots per month free with no card; Starter is $5 for 3,000, Growth $15 for 15,000, Pro $39 for 60,000, Scale $99 for 250,000 and Business $249 for 1,000,000. Yearly billing gives two months free, and every feature is available on every plan. Create a free ScreenshotNeo account to start with 1,000 screenshots a month and no card.
Testing checklist
- Test viewport, full-page and element captures.
- Test PNG and a compressed format, checking response headers.
- Test a fast page, a slow page and a page that never reaches network idle.
- Verify selector waits and image/font readiness on representative Svelte routes.
- Exercise invalid URLs, redirects, authentication and SSRF protections.
- Measure memory and elapsed time at your intended concurrency.
- Confirm the production adapter can run Chromium and reach external sites.
Frequently Asked Questions
Can a SvelteKit endpoint return a Playwright screenshot directly?
Yes. Await page.screenshot() in a +server.js or +server.ts route and return the resulting buffer in a Response with an image content type.
What should I use instead of network idle for a live Svelte app?
Wait for a selector that your app sets after the required data is rendered, optionally followed by a short bounded delay for animations or third-party content.
Can static SvelteKit hosting run this code?
No. A static-only deployment cannot launch a server-side browser; use a server adapter or an external browser service.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

