An error that says “Call to undefined function Intervention\Image\finfo_buffer()”. This error can occur if the PHP fileinfo
extension is not installed or enabled on your system.
The fileinfo
extension is used by the Intervention/Image package to determine the type of image files that you’re trying to manipulate. Without this extension, you won’t be able to use the Image
class to open and manipulate image files.
To fix this error, make sure the fileinfo
extension is installed and enabled on your system. To do so, follow these steps:
- Open your
php.ini
file and find the line that says;extension=fileinfo
. This line is a comment and is not currently enabling thefileinfo
extension. - Remove the
;
at the beginning of the line to uncomment it, so that it looks like this:extension=fileinfo
- Save the
php.ini
file and restart your web server.
Once you’ve done this, the fileinfo
extension should be enabled and you should be able to use the Intervention/Image package to manipulate image files.