I don't think you can, since it's build into the framework. You need to override some methods and reregister some components to do this, as far as I can tell.
I think your better of using only the intervention package.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I like how Laravel 5.3 handles file uploads:
$path = $request->file('avatar')->store('avatars');
// avatars/bf5db5c75904dac712aea27d45320403.jpeg
Is there any way to keep this functionality while using Intervention for image processing?
// This doesn't work, but something like...
$image = Image::make($request->file('avatar'));
$image->fit(250, 250, function ($constraint) {
$constraint->aspectRatio();
});
$path = Storage::put('avatars', $image);
@bobbybouwmann Thanks for the reply.
I just looked at the code for Spark (forgot it was updated to 5.3). Could use some refactoring but looks like it is possible.
$file = $request->file('avatar');
$path = $file->hashName('avatars');
// avatars/bf5db5c75904dac712aea27d45320403.jpeg
$image = Image::make($file);
$image->fit(250, 250, function ($constraint) {
$constraint->aspectRatio();
});
Storage::put($path, (string) $image->encode());
Please or to participate in this conversation.