diff --git a/wire/core/Pageimage.php b/wire/core/Pageimage.php index 75f68b32..4dcdf5bd 100644 --- a/wire/core/Pageimage.php +++ b/wire/core/Pageimage.php @@ -547,6 +547,13 @@ class Pageimage extends Pagefile { $a = @simplexml_load_string($xml)->attributes(); if((int) $a->width > 0) $width = (int) $a->width; if((int) $a->height > 0) $height = (int) $a->height; + if((!$width || !$height) && $a->viewBox) { + $values = explode(' ', $a->viewBox); + if(count($values) === 4) { + $width = (int) round($values[2]); + $height = (int) round($values[3]); + } + } } if((!$width || !$height) && (extension_loaded('imagick') || class_exists('\IMagick'))) { @@ -1873,4 +1880,3 @@ class Pageimage extends Pagefile { } } -