mirror of
https://github.com/processwire/processwire.git
synced 2025-08-15 11:14:12 +02:00
Update for processwire/processwire-issues#1812
This commit is contained in:
@@ -176,7 +176,15 @@ class FieldtypeImage extends FieldtypeFile implements FieldtypeHasFiles, Fieldty
|
|||||||
|
|
||||||
if($info) {
|
if($info) {
|
||||||
unset($info['ratio']); // ratio not stored in runtime image info
|
unset($info['ratio']); // ratio not stored in runtime image info
|
||||||
$pagefile->setImageInfo($info);
|
$w = isset($info['width']) ? (int) $info['width'] : 0;
|
||||||
|
$h = isset($info['height']) ? (int) $info['height'] : 0;
|
||||||
|
if($w === -100 && $h === -100) {
|
||||||
|
// we were previously unable to determine width and height
|
||||||
|
// so do not populate the cached values, forcing it to re-check
|
||||||
|
// this only occurs on SVG files
|
||||||
|
} else {
|
||||||
|
$pagefile->setImageInfo($info);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $pagefile;
|
return $pagefile;
|
||||||
|
Reference in New Issue
Block a user