dogado / mugshot
A small service that helps you take screenshots of web pages.
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Type:project
Requires
- php: ^8.0.2
- ext-exif: *
- ext-json: *
- guzzlehttp/guzzle: ^7.2
- laravel/framework: ^9.11
- laravel/sanctum: ^2.14.1
- laravel/tinker: ^2.7
- league/mime-type-detection: ^1.9
- sentry/sentry-laravel: ^2.4.0
- spatie/browsershot: ^3.52.3
- spatie/laravel-health: ^1.8
Requires (Dev)
- fakerphp/faker: ^1.14.1
- laravel/sail: 1.8
- mockery/mockery: ^1.4.4
- nunomaduro/collision: ^6.1
- nunomaduro/larastan: ^2.0
- phpunit/phpunit: ^9.5
- spatie/laravel-ignition: ^1.0
README
A small service that helps you take screenshots of web pages.
Requirements
- PHP 8
- MySQL
- Node for Puppeteer
Installation
git clone https://github.com/dogado/mugshot.git mugshot composer install --no-dev -o php artisan key:generate php artisan migrate php artisan storage:link
Mugshot uses Puppeteer in the background to create screenshots
npm install puppeteer --global
Usage
Capture Screenshot
POST /api/v1/screenshot
Parameter | Type | Description |
---|---|---|
url |
string |
URL of the page you want to capture |
width |
integer |
Width of the screenshot |
height |
integer |
Height of the screenshot |
fullPage |
boolean |
Allows you to capture the entire page |
deviceScale |
integer |
Between 1 and 3 |
quality |
integer |
Only works with JPG, uses percent |
delay |
integer |
Wait in seconds before taking a screenshot of the page |
fileExtension |
string |
PNG or JPG |
response |
string |
inline , download , json |
Status Check
GET /api/v1/status
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
License
The MIT License (MIT). Please see License File for more information.