Puppeteer 24 需要单独执行 npx puppeteer browsers install chrome-headless-shell 下载 Chrome,否则无法截图;环境要求 PHP 8.5+、Node.js 22+ 和 Composer 2,版本偏低会装不上;从 Laravel 8 升级需改 .env 变量名(CACHE_DRIVER→CACHE_STORE 等)并跑 migrate;官方不提供 Docker 镜像支持,第三方镜像需自担风险。
composer install --no-dev --optimize-autoloader
npm ci && npm run build
npx puppeteer browsers install chrome-headless-shellREADME 未说明显存或 GPU 要求;需要能运行 Chrome 无头浏览器(chrome-headless-shell)的环境,数据库可用 MySQL、PostgreSQL 或 SQLite。
基于 Laravel 的开源截图服务,通过简单 API 把任意网址渲染成网站截图
基于 Laravel 的截图即服务应用,通过 URL 或 API 请求自动抓取网页并生成截图,省去自建无头浏览器和截图流程的麻烦。
核心能力
- 提供简单 API 接口,传入网址即可生成网站截图
- 基于 Laravel 13 构建的 PHP Web 应用
- 用 Puppeteer 驱动 Chrome 无头浏览器渲染页面
- 支持 MySQL、PostgreSQL 或 SQLite 作为数据库
- 内置 screeenly:cleanup 定时任务清理旧截图
容易踩的坑
- v2.0.0最新正式版2017-02-11 · 2017-02-11 12:11 UTC
- Rewrite in newest Laravel Version
- Split "Laravel Code" from "Screeenly Code"
- v1.2.12016-02-22 · 2016-02-22 20:28 UTC
查看更新说明
New User-Agent for all screeenly requests:
screeenly-bot. - v1.2.02016-02-22 · 2016-02-22 20:27 UTC
查看更新说明
- Upgrade to Laravel 5.2
- Upgrade to PhantomJS 2.0 (Webfonts yay :tada:)
- v1.0.02015-09-05 · 2015-09-05 18:57 UTC
查看更新说明
New Feature:
- Multiple API Keys per Account
- v1.1.02015-09-05 · 2015-09-05 18:56 UTC
查看更新说明
Maintenance and refactor release.
- Rewritten Screenshot Core of the application
- Preparations for API v2
- New Exception Handler (mallinus/exceptions)
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
screeenly is an open source web application which lets users create website screenshots through a simple API. It's built with Laravel.
The latest version is hosted on screeenly.com. You can follow us on Twitter
☝️ A completely new version of screeenly has recently been released: https://3.screeenly.com.
The app has been rebuilt from the ground up. Its API now can also convert websites into PDFs, return the rendered HTML of a website. This now also works for your own provided HTML code. In addition, you can now update a lot more settings; like pixel density or wether images should be loaded.
The new app requires a paid subscription. The subscription covers server costs and maintenance.
The open source version of screeenly (this repo right here) which is hosted on http://screeenly.com will remain available for the forseeable future. If anything should change and you've registered on screeenly.com, you will receive a notice.
The repository runs on Laravel 13.
Documentation and more
The wiki holds the documentation.
Requirements
- PHP 8.5 or newer
- Composer 2
- Node.js 22 or newer and npm
- A Chrome binary for Puppeteer:
npx puppeteer browsers install chrome-headless-shell - MySQL, PostgreSQL or SQLite
Run the tests with vendor/bin/phpunit.
Format the code with composer format.
Build the frontend assets with npm ci && npm run build. The compiled files in public/css, public/js and public/mix-manifest.json are committed. Rebuild and commit them after you change resources/js or resources/sass. npm run dev builds without minification, npm run watch rebuilds on changes.
Upgrading from Laravel 8 (PHP 8.0)
- Switch the server to PHP 8.5 or newer.
- Run
composer install --no-dev --optimize-autoloader. - Run
npm ci,npm run buildandnpx puppeteer browsers install chrome-headless-shell. Puppeteer 24 needs this separate download. - Update
.env:CACHE_DRIVERis nowCACHE_STORE. The old name still works.FILESYSTEM_DRIVERis nowFILESYSTEM_DISK. The old name still works.MAIL_ENCRYPTIONis replaced byMAIL_SCHEME. Usesmtpsfor implicit TLS (port 465). Leave it empty for STARTTLS (port 587).BROADCAST_DRIVERis no longer used. Remove it.
- Run
php artisan migrate --force, thenphp artisan optimize. - Restart queue workers and PHP-FPM.
Self Hosting
screeenly is quite a simple PHP app. Therefore, it's quite easy to self host the application on your own server.
Self Hosting on your own Server
If you're comfortable running your own server follow your self-hosting guide here.
Laravel Forge
Deploy script for the site:
cd $FORGE_SITE_PATH
git pull origin $FORGE_SITE_BRANCH
$FORGE_COMPOSER install --no-dev --no-interaction --prefer-dist --optimize-autoloader
npm ci
npx puppeteer browsers install chrome-headless-shell
( flock -w 10 9 || exit 1
echo 'Restarting FPM...'; sudo -S service $FORGE_PHP_FPM reload ) 9>/tmp/fpmlock
$FORGE_PHP artisan migrate --force
$FORGE_PHP artisan optimize
The scheduler runs screeenly:cleanup every hour. Add a Forge scheduled job php artisan schedule:run every minute so it runs.
Deploy to Zeet
Otherwise, Zeet makes deploying Screeenly dead simple, just click the button above. This guide will walk you through the configuration needed.
Deploy to Heroku
If managing servers is not your thing, we've also written a guide on how to deploy the app to Heroku.
By using Heroku, you can run your own version of screeenly basically for free.
Docker Images
If you're interested in a Docker version of screeenly, you can use the daily built images created by Jacek Szafarkiewicz.
Please note: We do not provide any support for these Docker Images.
Security
If you discover a security vulnerability within this package, please e-mail us at [email protected]. All security vulnerabilities will be promptly addressed.
LICENSE
MIT