I am using PHP libvips library when I am using this function writeToBuffer for write to buffer the image it gives me below types of error.
Fatal error: Uncaught Jcupitt\Vips\Exception: magicksave_buffer: libMagick error: no decode delegate for this image format `' @ error/blob.c/ImagesToBlob/2413
Note - This error occurs only when my image type is gif
$imagePathInfo = pathinfo($inputFileName);
$imgExtension = $imagePathInfo['extension'];
$img = Vips\Image::newFromFile($inputFileName, ['access' => 'sequential']);
$img = $img->writeToBuffer('.' . $imgExtension);