| Install | |
|---|---|
composer require amjadiqbal/filament-url-image-uploader |
|
| PHP: | ^8.1 |
A powerful Filament PHP form component that enables seamless image uploads from URLs. Features include image validation, preview functionality, and easy integration with Laravel storage. Perfect for remote image imports, content management, and e-commerce applications built with FilamentPHP.
You can install the package via composer:
composer require amjadiqbal/filament-url-image-uploader
use Amjadiqbal\FilamentUrlImageUploader\UrlImageUploader;
UrlImageUploader::make('image')->directory('images');
[
"image" => "images/example.svg",
"image_url" => "http://your-domain.com/storage/images/example.svg"
]
// In your model (e.g., app/Models/Post.php)
protected function image(): Attribute
{
return Attribute::make(
get: fn ($value) => $value,
set: fn ($value) => is_array($value) ? $value['image'] : $value,
);
}
You can customize the storage directory:
UrlImageUploader::make('image')->directory('custom/path/here');
Need expert help? Hire me on Upwork for:
Please see CHANGELOG.md for more information on what has changed recently.
If you discover a security vulnerability, please report it in our Security Room on Discord. All security vulnerabilities will be promptly addressed.
We welcome contributions!
Made with contrib.rocks.
Hire me on Upwork for:
For priority support and enterprise solutions, please reach out via Upwork for direct assistance.