Skip to content

Using with Laravel Herd #850

Closed Answered by Biersteker
galangaidilakbar asked this question in Q&A
Discussion options

You must be logged in to vote
Route::get('/test/browsershot', function () {
    \Spatie\Browsershot\Browsershot::url('https://spatie.be/docs/browsershot/v4/usage/introduction')
        ->setNodeBinary("/Users/galang/Library/Application\ Support/Herd/config/nvm/versions/node/v18.19.0/bin/node")
        ->setNpmBinary("/Users/galang/Library/Application\ Support/Herd/config/nvm/versions/node/v18.19.0/bin/npm") // Adjust if your npm path is different
        ->windowSize(1366, 768)
        ->setScreenshotType('jpeg', 80)
        ->save('screenshot.jpg');
});

use a backslash.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@galangaidilakbar
Comment options

Answer selected by galangaidilakbar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants