pxlrbt/filament-image-compare
InfolistEntry component, meaning it is tightly coupled to the Filament Admin Panel ecosystem. It leverages Filament’s Infolist system to render side-by-side image comparisons, making it ideal for admin dashboards where visual before/after comparisons are needed (e.g., A/B testing, design iterations, or product comparisons).Entry pattern, meaning it can be dropped into existing Filament resources with minimal changes. No need to modify core Laravel or Filament logic.fn ($record) => $record->left_image) to fetch images from Eloquent models, ensuring flexibility with any database schema.storage_path(), S3, or CDN). No built-in image processing (e.g., resizing), so pre-processing may be required for performance.composer.json and monitor Filament’s release notes.composer require filament/filament).composer require pxlrbt/filament-image-compare
php artisan vendor:publish).Resource’s Table or Infolist:
use Pxlrbt\FilamentImageCompare\ImageCompareEntry;
ImageCompareEntry::make()
->leftImage(fn ($record) => $record->before_image_url)
->rightImage(fn ($record) => $record->after_image_url)
->columnSpanFull(), // Optional: Full-width layout
composer.json for supported Filament versions. Example:
"require": {
"filament/filament": "^3.0"
}
ProductResource, DesignResource).IntersectionObserver).| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Image URL returns 404 | Broken entry, poor UX | Fallback placeholder image or error state. |
| CORS blocks image loading | Images fail to render | Configure CORS headers or use proxy URLs. |
| Filament version mismatch | Package breaks or renders incorrectly | Pin package version or fork for compatibility. |
| High latency image loading | Slow UI, poor user experience | Lazy-load images or use a CDN. |
| Memory leaks (many entries) | App slowdown or crashes | Limit entries per page or use pagination. |
How can I help you explore Laravel packages today?