Intervention/image · error · Intervention\Image\Exceptions\FileNotReadableException
File "{path}" contained in SplFileInfo is not readable
Error message
File "{path}" contained in SplFileInfo is not readable What it means
Error "File "{path}" contained in SplFileInfo is not readable" thrown in Intervention/image.
Source
Thrown at src/Traits/CanParseFilePath.php:119
throw new FileNotFoundException(
'File "' . $basename . '" contained in SplFileInfo was not found in directory "' . $dirname . '"',
);
}
if (!is_file($path)) {
throw new FileNotFoundException(
'File "' . $basename . '" contained in SplFileInfo is no file in directory "' . $dirname . '"',
);
}
if (!is_readable($dirname)) {
throw new FileNotReadableException(
'Directory "' . $dirname . '" contained in SplFileInfo is not readable',
);
}
if (!is_readable($path)) {
throw new FileNotReadableException(
'File "' . $path . '" contained in SplFileInfo is not readable',
);
}
$realpath = $splFileInfo->getRealPath();
if ($realpath === false) {
throw new FileNotReadableException('Failed to read file "' . $path . '" from ' . SplFileInfo::class);
}
return $realpath;
}
}
View on GitHub (pinned to 5598b9e397)
Solutions
- Check is_readable($path) and fix file permissions/ownership
- Make sure the file still exists and is not locked by another process
- Respect open_basedir restrictions in php.ini when reading outside the web root
When it happens
Trigger: Thrown at src/Traits/CanParseFilePath.php:119 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Intervention/image@5598b9e397 (2026-08-23).
Data as JSON: /api/errors/3bad82c2d7498a41.
Report an issue: GitHub.