Generate professional Gumroad product images from HTML templates using Edge headless screenshots.
TypeSizeUseCover600x600Gumroad thumbnail, Discover, profile pagePreview1280x720Product page showcase image
Collect from user:
Use templates in assets/ as base. Key rules:
⚡ not ⚡) to prevent encoding corruption on Windowshtml { background: <darkest-color>; } to prevent white edges on screenshot100vw/ 100vh for body dimensions, not fixed pixels'Segoe UI', system-ui, sans-serifLayout: centered card with badge, icon/number, title, subtitle, tags.
Layout: left side (badge + icon + title + subtitle + tags) | right side (content list card + CTA button).
CTA button text: "Get Instant Access →" (never mention price/free).
Start a local HTTP server if not running:
powershell
cd <product-images-dir>; npx http-server -p 8765 --cors -c-1
Screenshot with Edge headless:
powershell
# Cover (600x600)
& "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" --headless --screenshot="cover.png" --window-size=600,600 --force-device-scale-factor=1 "<url>/cover.html"
# Preview (1280x720)
& "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" --headless --screenshot="preview.png" --window-size=1280,720 --force-device-scale-factor=1 "<url>/preview.html"
For multiple products, loop:
powershell
$products = @("product-a","product-b","product-c")
foreach($name in $products) {
$types = @(@{file="cover";w=600;h=600}, @{file="preview";w=1280;h=720})
foreach($t in $types) {
$png = "F:\path\$name\$($t.file).png"
& "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" --headless --screenshot="$png" --window-size="$($t.w),$($t.h)" --force-device-scale-factor=1 "http://127.0.0.1:8765/$name/$($t.file).html"
}
Write-Host "Done: $name"
}
After screenshot, check:
See assets/themes.json for predefined themes. Each theme has:
bg: gradient stops for body backgroundhtml_bg: solid color for html elementaccent: primary accent color for badges/CTAsaccent2: secondary accent for gradientsdot: color for list dotshighlight: color for headings/titles