mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-13 15:07:49 +00:00
feat: add Browser viewport fallback to v1
This commit is contained in:
parent
29d1838690
commit
8791a5154e
3 changed files with 21 additions and 7 deletions
|
|
@ -44,13 +44,12 @@ class ImageGenerationService
|
|||
$browserStage->html($markup);
|
||||
|
||||
if (config('app.puppeteer_window_size_strategy') === 'v1') {
|
||||
// default behaviour for Framework v1
|
||||
$browserStage->useDefaultDimensions();
|
||||
} else {
|
||||
$browserStage
|
||||
->width($imageSettings['width'])
|
||||
->height($imageSettings['height']);
|
||||
} else {
|
||||
$browserStage
|
||||
->width(800)
|
||||
->height(480);
|
||||
}
|
||||
|
||||
if (config('app.puppeteer_wait_for_network_idle')) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue