Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Filament Url Image Uploader Laravel Package

amjadiqbal/filament-url-image-uploader

View on GitHub
Deep Wiki
Context7

Filament URL Image Uploader

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.

Installation

You can install the package via composer:

composer require amjadiqbal/filament-url-image-uploader

Usage

use AmjadIqbal\FilamentUrlImageUploader\Components\UrlImageUploader;

UrlImageUploader::make('image')->directory('images');

The field renders two tabs — upload a file directly, or paste an image URL and fetch it server-side. Either way, the value saved to your model attribute is always a plain storage path string (e.g. "images/example.jpg"), never an array — no accessor/mutator gymnastics required on your model:

// database column: image (string, nullable)

class Post extends Model
{
    protected $fillable = ['image'];
}

To render the stored image elsewhere in your app, resolve it through the disk you configured:

Storage::disk('public')->url($post->image);

Configuration

Directory

You can customize the storage directory:

UrlImageUploader::make('image')->directory('custom/path/here');

Disk

By default, files are stored on the public disk. You can target any configured disk:

UrlImageUploader::make('image')->disk('s3');

Preserve original filenames

UrlImageUploader::make('image')->preserveFilenames();

URL fetch size limit

The "URL Upload" tab downloads the remote image server-side before validating its content type. By default, downloads larger than 10 MB are rejected; adjust it with:

UrlImageUploader::make('image')->maxUrlFetchSize(5 * 1024 * 1024); // 5 MB

Scope

UrlImageUploader manages a single image per field. It does not currently support Filament's multiple() mode — for a gallery of several images, use one UrlImageUploader per image, or a Repeater of them.

Testing

composer test      # PHPUnit, via Orchestra Testbench
composer analyse    # Larastan/PHPStan (level 5)
composer format     # Laravel Pint

Support

Documentation

Community

Professional Support

Need expert help? Hire me on Upwork for:

  • Custom implementations
  • Feature development
  • Technical consulting
  • Priority support

Changelog

Please see CHANGELOG.md for more information on what has changed recently.

Security Vulnerabilities

If you discover a security vulnerability, please report it in our Security Room on Discord. All security vulnerabilities will be promptly addressed.

Contributing

We welcome contributions!

Contributors

Made with contrib.rocks.

Custom Development

Hire me on Upwork for:

  • Package integration
  • Custom feature development
  • Technical consultation
  • Project implementation

Community Support

For priority support and enterprise solutions, please reach out via Upwork for direct assistance.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
codraw/framework-extra-bundle
codraw/messenger
codraw/security
codraw/mailer
codraw/contracts
codraw/profiling
codraw/dependency-injection
codraw/tester
codraw/core
nexmo/api-specification
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony