Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Browsershot Laravel Package

spatie/browsershot

Render web pages (URLs or HTML) to images or PDFs from PHP/Laravel using headless Chrome via Puppeteer. Save screenshots/PDFs, render local HTML files, extract post-JS body HTML, and inspect requests triggered by a page.

View on GitHub
Deep Wiki
Context7
5.2.3
  • Allow http(s) URLs to localhost in HTML (fixes false positive with Vite dev server)

Full Changelog: https://github.com/spatie/browsershot/compare/5.2.2...5.2.3

5.2.1

What's Changed

Full Changelog: https://github.com/spatie/browsershot/compare/5.2.0...5.2.1

5.2.0

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/browsershot/compare/5.1.1...5.2.0

5.1.1

What's Changed

Full Changelog: https://github.com/spatie/browsershot/compare/5.1.0...5.1.1

5.1.0

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/browsershot/compare/5.0.11...5.1.0

5.0.11

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/browsershot/compare/5.0.10...5.0.11

5.0.10

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/browsershot/compare/5.0.9...5.0.10

5.0.9

What's Changed

Full Changelog: https://github.com/spatie/browsershot/compare/5.0.8...5.0.9

5.0.8

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/browsershot/compare/5.0.7...5.0.8

5.0.6

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/browsershot/compare/5.0.5...5.0.6

5.0.0

Full Changelog: https://github.com/spatie/browsershot/compare/4.4.0...5.0.0

Breaking Changes

  • Requires Puppeteer version 23.0 or higher!

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/browsershot/compare/4.3.1...5.0.0

4.3.1

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/browsershot/compare/4.3.0...4.3.1

4.3.0

What's Changed

Full Changelog: https://github.com/spatie/browsershot/compare/4.2.1...4.3.0

4.2.1

Revert changes of 4.2.1 because PDFs do not render correctly anymore (see https://github.com/spatie/laravel-pdf/issues/175)

Full Changelog: https://github.com/spatie/browsershot/compare/4.2.0...4.2.1

4.2.0

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/browsershot/compare/4.1.3...4.2.0

4.1.3

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/browsershot/compare/4.1.2...4.1.3

4.1.2

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/browsershot/compare/4.1.1...4.1.2

4.1.1

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/browsershot/compare/4.1.0...4.1.1

4.1.0
4.0.5

What's Changed

Full Changelog: https://github.com/spatie/browsershot/compare/4.0.4...4.0.5

4.0.4

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/browsershot/compare/4.0.3...4.0.4

4.0.3

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/browsershot/compare/4.0.2...4.0.3

4.0.2

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/browsershot/compare/4.0.1...4.0.2

4.0.1

What's Changed

Full Changelog: https://github.com/spatie/browsershot/compare/4.0.0...4.0.1

4.0.0
  • modernize codebase
  • made dependency on spatie/image optional
3.61.0

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/browsershot/compare/3.60.2...3.61.0

3.60.2

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/browsershot/compare/3.60.1...3.60.2

3.60.1

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/browsershot/compare/3.60.0...3.60.1

3.60.0

What's Changed

Full Changelog: https://github.com/spatie/browsershot/compare/3.59.0...3.60.0

3.59.0
3.58.2

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/browsershot/compare/3.58.1...3.58.2

3.58.1

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/browsershot/compare/3.58.0...3.58.1

3.58.0

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/browsershot/compare/3.57.8...3.58.0

3.57.8

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/browsershot/compare/3.57.7...3.57.8

3.57.7

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/browsershot/compare/3.57.6...3.57.7

3.57.6

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/browsershot/compare/3.57.5...3.57.6

3.57.5
3.57.4

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/browsershot/compare/3.57.3...3.57.4

3.57.3
  • Do not allow file:// to be used
3.57.2

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/browsershot/compare/3.57.1...3.57.2

3.57.1

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/browsershot/compare/3.57.0...3.57.1

3.57.0

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/browsershot/compare/3.56.0...3.57.0

3.56.0
  • add failedRequests method
3.54.0
3.53.0
3.52.6
3.52.5
3.52.4
3.52.3
3.52.2
  • Add debug output to vague CouldNotTakeBrowsershot exception

Full Changelog: https://github.com/spatie/browsershot/compare/3.52.1...3.52.2

3.52.1
3.52.0
3.51.0
3.50.2
  • fix blockDomains and blockUrls methods (#564)
3.50.1
  • fix browser.js to only abort or continue the request once (#548)
3.50.0
  • added functionality to only send headers with navigational requests (#542)
3.49.0
  • add support for the --user-data-dir flag (#540)
3.48.0
  • support spatie/image v2
3.41.0
  • adding ability to pass envars to browser instance (#448)
3.47.0
  • re-add support for symfony/process:^4.2
3.46.0
  • add base64pdf method (#512)
3.45.0
  • add ability to make POST requests (#496)
3.44.1.
  • bump temporary-directory to version 2.0 (#495)
3.44.0
  • add scale option (#478)
3.43.0
  • add support for scale option in PDF (#478)
3.42.0
  • introduce a selectorIndex to bypass querySelector restrictions (#468)
3.41.2
  • improve local require for puppeteer (#461)
3.41.1
  • replace waitFor with waitForTimeout (#452)
3.40.3
  • add support for PHP 8
3.40.2
  • revert changes from previous version
3.40.1
  • prevent local files from being rendered
3.40.0
  • added base64Screenshot
3.39.0
  • add usePipe to use pipe instead of WebSocket (#423)
3.38.0
  • pass puppeteer to callChrome() (#399)
3.37.2
  • Replace emulateMedia call with emulateMediaType (#411)
3.37.1
  • account for the removal of require('puppeteer/DeviceDescriptors') (#406)
3.37.0
  • get the list of triggered requests (#402)
3.36.0
  • add use of WS Endpoint option (#390)
3.35.0
  • adds blockUrls and blockDomains
3.34.10
  • adds disableImages method to prevent images from loading (#362)
3.33.1
  • allow symfony 5 components
3.33.0
  • allow to connect to remote chromium instance (#341)
3.32.1
  • fix screenshots not deleting temporary files on the filesystem
3.32.0
  • add support for HTTP authentication
3.31.1
  • fix screenshot image manipulations
3.31.0
  • allow to specify the cookie domain
3.30.0
  • allow JavaScript to be disabled
3.29.0
  • add addChromiumArguments
3.28.0
  • add selectOption
3.27.0
  • paperSize and margins can now use custom units
3.26.3
  • add writeOptionsToFile
3.26.2
  • fix for setting cookies
3.26.1
  • update lower deps
3.26.0
  • new methods addStyleTag and device added
  • fixed a bug where chrome would not shut down properly
3.25.1
  • improve compatibilty with W-w-windows
3.25.0
  • add type
3.24.0
  • add useCookies
3.23.1
  • improve compatibility with Windows
3.23.0
  • added waitForFunction
3.22.1
  • better handling of timeouts
3.22.0
  • add evaluate
3.21.0
  • add setScreenshotType
3.20.1
  • fix typehint in emulateMedia
  • drop PHP 7.0 support
3.20.0
  • add click
3.19.0
  • add setExtraHttpHeaders

3.18.0 - 2018-03-28

  • add support for taking screenshot of an element using a selector

3.17.0 - 2018-02-22

  • add support for custom binary/browser script

3.16.1 - 2018-02-08

  • support symfony ^4.0
  • support phpunit ^7.0

3.16.0 - 2018-01-28

  • add waitUntilNetworkIdle

3.15.0 - 2018-01-20

  • add ability to set sustom header and footer

3.14.1 - 2017-12-24

  • update dep on spatie/image

3.14.0 - 2017-12-10

  • add setChromePath

3.13.0 - 2017-12-07

  • add ability to set node module path
  • add ability to output directory to the browser

3.12.0 - 2017-11-20

  • add setDelay

3.11.1 - 2017-11-18

  • improve error handling for when no extension is provided

3.11.0 - 2017-11-16

  • add setOption
  • refactor internals

3.10.0 - 2017-11-13

  • add setProxyServer

3.9.0 - 2017-11-13

  • add dismissDialogs

3.8.1 - 2017-11-10

  • move snapshot package to dev-deps

3.8.0 - 2017-11-07

  • allow the use of the 'omitBackground' option when capturing screenshots

3.7.0 - 2017-10-31

  • add docblocks for static constructors to support IDE autocompletion

3.6.0 - 2017-10-31

  • make paperSize use floats instead of integers, addressing US paper sizes

3.5.0 - 2017-10-28

  • add mobile and touch functions

3.4.0 - 2017-10-27

  • add ignoreHttpsErrors

3.3.1 - 2017-10-26

  • fix default npm path

3.3.0 - 2017-10-25

  • add noSandbox

3.2.1 - 2017-10-25

  • fix setting margins

3.2.0 - 2017-10-18

  • add setNetworkIdleTimeout

3.1.0 - 2017-10-18

  • make node and npm paths configurable
  • improved out of the box experience for Laravel Valet users

3.0.0 - 2017-10-16

  • use Puppeteer to call Chrome
  • add various options enabled by using Puppeteer

2.4.2 - 2017-12-24

  • update dep on spatie/image

2.4.1 - 2017-09-27

  • add the default path for linux Chromium users

2.4.0 - 2017-09-21

  • add bodyHtml method

2.3.0 - 2017-09-19

  • add high pixel density support

2.2.0 - 2017-08-31

  • add support for directly converting some html

2.1.0 - 2017-08-06

  • add support for saving pdfs

2.0.3 - 2017-07-05

  • lower symfony/process requirement

2.0.2 - 2017-07-05

  • security improvements
  • clean up unneeded files

2.0.1 - 2017-07-04

  • add support for urls with special characters

2.0.0 - 2017-07-03

  • complete rewrite
  • ditch PhantomJS is favour of headless Chrome

1.9.1 - 2017-06-02

  • fix error message

1.7.0 - 2017-05-13

  • added support MacOS

1.8.0 - 2017-04-27

  • added support for setting a custom user agent

1.8.0 - 2017-04-27

  • added support for setting a custom user agent

1.7.0 - 2017-03-14

  • added support for W w w windows

1.6.0 - 2017-01-02

  • added support for some more extensions

1.5.4 - 2016-12-17

  • make width protected

1.5.3 - 2016-11-12

  • Fix width issues

1.5.2 - 2016-08-18

  • Upgrade phantomjs binary

1.5.1 - 2016-04-25

  • Fixed a bug where phantomjs keeps on rendering until the end of time

1.5.0

  • Added a method to set the background color

1.4.0

  • Added timeout parameter

1.3.0

  • Added quality parameter
What's
Changelog

All notable changes to Browsershot will be documented in this file

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport