wnx/sidecar-browsershot
Run Spatie Browsershot on AWS Lambda via Sidecar for Laravel. Generate PDFs/screenshots without installing Node, Puppeteer, or Chrome on your server—headless Chrome runs in a deployed Lambda function. Includes config publishing and Sidecar deploy steps.
"Serverless PDF/Image Generation to Cut Cloud Costs by 60%+ This package moves heavy lifting—like converting web pages to PDFs or high-res images—from always-on servers to AWS Lambda, paying only for usage. For example:
Why now?
Risk: Minimal—MIT-licensed, actively maintained, and tested in production by Stefan Zweifel (Laravel core contributor)."
"Leverage Sidecar to Offload Browsershot to Lambda Problem: Self-hosted Browsershot (Chromium/Puppeteer) requires:
Solution: Use wnx/sidecar-browsershot to:
BrowsershotLambda facade (drop-in API)..env).resources/sidecar-browsershot/fonts).spatie/image).Implementation:
composer require wnx/sidecar-browsershot hammerstone/sidecar spatie/browsershot
php artisan vendor:publish --tag="sidecar-browsershot-config"
# Update sidecar.php to include BrowsershotFunction
php artisan sidecar:deploy --activate
Usage (identical to Spatie’s Browsershot):
BrowsershotLambda::url('https://example.com')->save('invoice.pdf');
BrowsershotLambda::html('<h1>Hello</h1>')->saveToS3('report.pdf');
Trade-offs:
SIDECAR_BROWSERSHOT_WARMING_INSTANCES=3).Next Steps:
How can I help you explore Laravel packages today?