diff --git a/app/Services/BrowsershotService.php b/app/Services/BrowsershotService.php index 908c534..f4610b6 100644 --- a/app/Services/BrowsershotService.php +++ b/app/Services/BrowsershotService.php @@ -43,7 +43,10 @@ public function takeScreenshot(string $url, array $options = []): array private function configureBrowsershot(string $url, array $options = []): Browsershot { - $browsershot = Browsershot::url($url); + $browsershot = Browsershot::url($url) + ->waitUntilNetworkIdle() + ->preventUnsuccessfulResponse(); + if (App::environment('production')) { $browsershot->noSandbox();