microweber-packages / microweber-media-pixum
Standalone Laravel package for generating and serving placeholder (pixum) images. No exit() calls — fully testable.
Package info
github.com/microweber-packages/microweber-media-pixum
pkg:composer/microweber-packages/microweber-media-pixum
v1.0.0
2026-11-03 11:41 UTC
Requires
- php: ^8.1
- illuminate/http: ^10.0|^11.0|^12.0|^13.0
- illuminate/routing: ^10.0|^11.0|^12.0|^13.0
- illuminate/support: ^10.0|^11.0|^12.0|^13.0
- microweber-packages/laravel-helper-functions: *
- microweber-packages/microweber-package: *
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- larastan/larastan: ^3.9
- laravel/dusk: ^8.0|^9.0
- livewire/livewire: ^3.0|^4.0
- orchestra/testbench: ^8.0|^9.0|^10.0
- phpunit/phpunit: ^10.0|^11.0
Suggests
None
Provides
None
Conflicts
None
Replaces
- microweber-packages/media-pixum: *
This package is auto-updated.
Last update: 2026-11-03 17:07:04 UTC
README
Standalone Laravel package for generating and serving placeholder (pixum) PNG images.
Features
- No
exit()calls — fully testable with PHPUnit, Dusk, and Livewire - Cached generation — images are generated once and served from disk
- Configurable — background colour, max dimensions, cache path
- Standalone — works in any Laravel 10+ application
- Route & helpers —
pixum($width, $height)helper and/pixum_imgroute
Installation
composer require microweber-packages/microweber-media-pixum
The package auto-discovers its service provider. Publish the config:
php artisan vendor:publish --tag=media-pixum-config
Usage
Helper function
// Returns URL to a 200×200 placeholder $url = pixum(200, 200); // Returns filesystem path $path = pixum_path(300, 200);
Facade
use MicroweberPackages\MediaPixum\Facades\Pixum; $path = Pixum::generate(400, 300); $url = Pixum::url(400, 300);
Route
GET /pixum_img?width=200&height=200
Returns a PNG image with appropriate caching headers.
Configuration
See config/media-pixum.php for all options.
Testing
composer test
License
MIT