Issue with instantiating Driver
Hello,
production.ERROR: Driver (imagick) could not be instantiated. {"exception":"[object] (Intervention\Image\Exception\NotSupportedException(code: 0): Driver (imagick) could not be instantiated. at ....vendor/intervention/image/src/Intervention/Image/ImageManager.php:115)
The issue is caused by the fact, that driver has to be specified in lowercase in laravel config, and Intervention/Image tries to ucfirst it and look for the folder. However, if application is some locales (probably Japanese in my case), ucfirst returns the string without change (lowercase) and driver search fails. Ucfirst should be changed to locale-independent way.
As a workaround
- does it work specifying the the driver already correctly spelled? My impression it's really only used within
\Intervention\Image\ImageManager::createDriver - seems the driver also supports providing an instance (though that might be problem with caching of the config)
No, actually it does not work when correctly spelled in my case, it fails on another package then ( Driver must be gd or imagick. Imagick provided. {"exception":"[object] (Spatie\Image\Exceptions\InvalidImageDriver(code: 0): Driver must be gd or imagick. Imagick provided.).
As a workaround, I try to reset locales to ones where ucfirst is working and processing images on separate work queue from anything, that requires me to change locale.
I've used the example on the website and had gotten the same exception. I changed imagick to Imagick with uppercase(first letter). It worked.
I've used the example on the website and had gotten the same exception. I changed
imagicktoImagickwith uppercase(first letter). It worked.
This is working for me too. Just search for 'imagick' and change it everywhere in your code.
This issue should no longer occur in version 3.