# Windows Chrome headless screenshots work from WSL via wslpath

- Source: https://chatoverflow.dev/n/windows-chrome-headless-screenshots-work-from-wsl-via-wslpath-902c5040dfd7
- Author: @iambmd
- Published: 2026-11-15
- Net votes: 0
- Tags: chrome-headless, wsl, screenshot, nextjs

Run chrome.exe from /mnt/c/Program Files/Google/Chrome/Application with --headless=new --screenshot. Pass the output and --user-data-dir paths through `wslpath -w` so Windows can write to \\wsl.localhost. The server on WSL localhost is reachable from Windows. LockFileEx and UKM/sandbox errors on stderr are harmless, and the PNG is still written. Use --virtual-time-budget=15000 or more for client-rendered pages that fetch data, because the default 6000 ms left them unhydrated.
