Download the PHP package badrshs/laravel-dynamic-image-composer without Composer
On this page you can find all versions of the php package badrshs/laravel-dynamic-image-composer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download badrshs/laravel-dynamic-image-composer
More information about badrshs/laravel-dynamic-image-composer
Files in badrshs/laravel-dynamic-image-composer
Package laravel-dynamic-image-composer
Short Description Compose images dynamically from templates with text and image overlays
License MIT
Informations about the package laravel-dynamic-image-composer
Laravel Dynamic Image Composer
Compose images dynamically from templates with text and image overlays. Perfect for generating certificates, badges, social media graphics, or any dynamic image content.
Features
- 🎨 Visual Designer Interface - Drag-and-drop template designer with live preview
- 📝 Dynamic text overlays with custom fonts, colors, and positioning
- 🖼️ Image overlay support with opacity and positioning
- 🌍 Multi-language support (Arabic, English, and more)
- 📐 Flexible positioning (left, center, right alignment)
- 🎯 Template-based generation with database storage
- 🔧 Filament admin panel integration (optional)
- 💾 Multiple storage disk support
- ⚡ Simple, fluent API
Installation
Install via Composer:
Quick Install (Recommended)
Run the install command which will publish config, migrations, views, and optionally fonts:
This command will:
- ✅ Publish configuration file
- ✅ Publish migrations
- ✅ Publish views
- ✅ Publish default fonts (with --with-fonts flag)
- ✅ Create necessary directories
- ✅ Run migrations (with confirmation)
- ✅ Create storage link
Manual Installation
If you prefer manual installation:
Quick Start
Visual Designer Interface
The package includes a complete drag-and-drop visual designer for creating and editing templates:
- Create a template via Filament or directly in the database
- Click the "Designer" button on any template
- Upload image elements (logos, stamps, decorations)
- Drag and position elements on the canvas
- Add text fields with positioning and styling
- Preview your design in real-time
- Generate the final composite image
Accessing the Designer:
Basic Usage
With Image Overlays
Using Database Templates
Configuration
Edit config/dynamic-image-composer.php:
Field Configuration
Each field supports these options:
| Option | Type | Description | Default |
|---|---|---|---|
value |
string | Text to display | Required |
x |
int|'center' | X position or 'center' | 0 |
y |
int | Y position | 0 |
fontSize |
int | Font size | 20 |
color |
string | Color name from config | 'black' |
font |
string | Font name from config | 'default' |
alignment |
string | 'left', 'center', 'right' | 'left' |
Filament Integration (Optional)
If you're using Filament, register the resource in your panel:
This provides a full admin interface for managing templates and elements, including:
- Template CRUD operations
- Visual designer interface
- Element management
- Live preview generation
Displaying Generated Images
Use the included Blade component to display generated images in a grid:
Where $generatedImages is an array of:
Advanced Usage
Custom Fonts
Add custom fonts to your public/fonts directory or storage, then register them in config:
Custom Colors
Add custom colors in config:
Arabic Text Support
The package automatically detects and handles Arabic text:
Use Cases
- 📜 Certificates and diplomas
- 🏆 Achievement badges
- 🎫 Event tickets
- 📱 Social media graphics
- 🎴 ID cards and passes
- 📊 Dynamic reports with charts
- 🎨 Personalized marketing materials
Requirements
- PHP 8.1 or higher
- Laravel 10.x, 11.x, or 12.x
- GD Library (enabled by default in most PHP installations)
- Default fonts included (Roboto for English, Noto Kufi Arabic for Arabic)
License
MIT License. See LICENSE file for details.
Credits
Developed by Badr Shs
All versions of laravel-dynamic-image-composer with dependencies
illuminate/support Version ^10.0|^11.0|^12.0
illuminate/database Version ^10.0|^11.0|^12.0
ext-gd Version *
khaled.alshamaa/ar-php Version ^6.3