Skip to content

Commit

Permalink
fix: update puppeteer arguments to fix thumbnail generation
Browse files Browse the repository at this point in the history
  • Loading branch information
alkrauss48 committed Sep 1, 2024
1 parent 5faf622 commit 70fca13
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions app/Jobs/GenerateThumbnail.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,19 @@ public function handle(): void
->waitUntilNetworkIdle()
->windowSize(1200, 630)
->newHeadless()
->setOption('args', ['--disable-web-security'])
->setOption('args', [
'--disable-web-security',
'--disable-gpu',
'--disable-dev-shm-usage',
'--disable-setuid-sandbox',
'--no-first-run',
'--no-sandbox',
'--no-zygote',
'--deterministic-fetch',
'--disable-features=IsolateOrigins',
'--disable-site-isolation-trials',
])
->setScreenshotType('jpeg', 90)
->noSandbox()
->setOption('addStyleTag', json_encode([
'content' => '.slide-view { height: 100vh !important; } '
.'.browsershot-hide { display: none !important; }',
Expand Down

0 comments on commit 70fca13

Please sign in to comment.