getgrav/grav · error · RuntimeException
You need to EXIF PHP Extension to use this function
Error message
You need to EXIF PHP Extension to use this function
What it means
Error "You need to EXIF PHP Extension to use this function" thrown in getgrav/grav.
Source
Thrown at system/src/Grav/Common/Page/Medium/ImageFile.php:200
$data = [
$inputInfos,
$this->serializeOperations(),
$type,
$quality,
$extras
];
$this->hash = sha1(serialize($data));
}
/**
* Read exif rotation from file and apply it.
*/
public function fixOrientation()
{
if (!extension_loaded('exif')) {
throw new RuntimeException('You need to EXIF PHP Extension to use this function');
}
if (!file_exists($this->source->getInfos()) || !in_array(exif_imagetype($this->source->getInfos()), [IMAGETYPE_JPEG, IMAGETYPE_TIFF_II, IMAGETYPE_TIFF_MM], true)) {
return $this;
}
// resolve any streams
/** @var UniformResourceLocator $locator */
$locator = Grav::instance()['locator'];
$filepath = $this->source->getInfos();
if ($locator->isStream($filepath)) {
$filepath = $locator->findResource($this->source->getInfos(), true, true);
}
// Make sure file exists
if (!file_exists($filepath)) {
return $this;
}View on GitHub (pinned to 6040efed04)
When it happens
Trigger: Thrown at system/src/Grav/Common/Page/Medium/ImageFile.php:200 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of getgrav/grav@6040efed04 (2026-08-17).
Data as JSON: /api/errors/9e4d79f3b39ed8bb.
Report an issue: GitHub.