<?php use Illuminate\Support\Facades\Storage; $screenshot = Browsershot::url('url-to-screenshot') ->setScreenshotType('png') ->fullPage() ->setOption('viewport.deviceScaleFactor', 1) ->setDelay(3000) ->screenshot(); Storage::disk('s3')->put('image.png', $screenshot, 'public');
How to Save Screenshot from Browsershot
516
2 years ago
0 comments
To save a screenshot from the Browsershot package that's other than the local file you can call the "screenshot()" method at the end which then will return the file that can be saved into a disk such as "s3" or other object storage such as "vultr" and "digital ocean".
By doing so you can specify any of the other disk types other than saving it to the storage directory. Do give it a try first and cheers! Happy coding.
Topics:
Frontend
Resource
Average
Average
Support Us
If you like our tutorial, support us by being our Patreon or buy us some coffee ☕️
Leave a reply