Image intervention - Image source not readable

David Carr

Laravel Framework

Table of Contents

When using intervention package for uploading images you may come across this error when uploading an image:

Image source not readable

This means the image path cannot be read by intervention. This can happen as intervention uploads to storage when the disk isn't specified.

If you want to use storage then ensure Laravel created a symbolic link:

php artisan storage:link

If you want to use the public disk set your filesystem in .env to public

FILESYSTEM_DRIVER=public

Then in config/filesystems.php:

'public' => [
    'driver'     => 'local',
    'root'       => public_path(),
    'url'        => env('APP_URL').'/images',
    'visibility' => 'public',
],

This will ensure the public disk points to the public folder and set the URL to the application URL followed by an images path.

Laravel Modules Your Logo Your Logo Your Logo

Become a sponsor

Help support the blog so that I can continue creating new content!

Sponsor

My Latest Book

Modular Laravel Book - Laravel: The Modular way

Learn how to build modular applications with Laravel Find out more

Subscribe to my newsletter

Subscribe and get my books and product announcements.

Learn Laravel with Laracasts

Faster Laravel Hosting

© 2006 - 2024 DC Blog. All code MIT license. All rights reserved.