Puppeteer Customization
Astro Snapshot allow you to pass through options directly to Puppeteer for more control over the screenshot generation process.
In this example, we use deviceScaleFactor to increase the pixel density for sharper images on high-DPI displays.
There’s several pass-through properties you can set for fine-grained control over the whole process.
| Option | Relevant Puppeteer Method |
|---|---|
gotoOptions | page.goto() |
setViewportOptions | page.setViewport() |
screenshotOptions | page.screenshot() |
launchOptions | puppeteer.launch() |