Reputation: 61
When I used Laravel Intervention image in localhost then it's working perfect but this when upload live server in my control panel then it's not working...
Upvotes: 3
Views: 11897
Reputation: 482
If you are using "imageIntervention" V3 and face this error then you have to update some function because fome functions are replaced.
Reference: https://image.intervention.io/v3/introduction/upgrade
Upvotes: 0
Reputation: 159
Note: This solution is for v3 of the intervention image package.
1- In your controller add the following line:
use Intervention\Image\Laravel\Facades\Image;
2- Image::make()
will not work with v3. Instead of it, use
Image::read($file);
for more info follow the links: https://image.intervention.io/v3
https://image.intervention.io/v3/modifying/resizing
Upvotes: 4
Reputation: 464
in config/app.php
In the $providers array add the service providers for this package.
Intervention\Image\ImageServiceProvider::class
Add the facade of this package to the $aliases array.
'Image' => Intervention\Image\Facades\Image::class
according to this link http://image.intervention.io/getting_started/installation
or at the head of your controller add this after installing it:-
use Intervention\Image\ImageManagerStatic as Image;
Upvotes: 7