Screenshots
Community Resources:
Feed this runtime service a URL and it return a fully rendered screenshot image from that page (using Puppeteer):
Open Source #
Usage #
Try it out on the Eleventy API Explorer.
Image URLs have the format:
https://v1.screenshot.11ty.dev/:url/
https://v1.screenshot.11ty.dev/:url/:size/
https://v1.screenshot.11ty.dev/:url/:size/:aspectratio/
https://v1.screenshot.11ty.dev/:url/:size/:aspectratio/:zoom/
urlmust be URI encoded.- Valid
sizevalues:small: 375×___ (default)medium: 650×___large: 1024×___aspectratioof9:16is not supported (throws an error)
opengraph: always 1200×630, works withzoomaspectratiois ignored (no errors thrown)
- Valid
aspectratiovalues:1:1(default)9:16
- Valid
zoomvalues:bigger(1.4devicePixelRatio)smaller(0.71devicePixelRatio)
Samples #
<img src="https://v1.screenshot.11ty.dev/https%3A%2F%2Fwww.11ty.dev%2Fdocs%2F/small/9:16/bigger/" class="screenshot screenshot-first-example" width="375" height="667" loading="lazy" decoding="async" alt="Screenshot of 11ty.dev">
