diff --git a/Classes/Domain/Model/Image.php b/Classes/Domain/Model/Image.php index 98eed05..3a467b6 100644 --- a/Classes/Domain/Model/Image.php +++ b/Classes/Domain/Model/Image.php @@ -122,7 +122,8 @@ public static function fromArray(array $value): ?self if (isset($value['width']) && isset($value['height'])) { $image = static::fromDimensions( (int) $value['width'], - (int) $value['height'] + (int) $value['height'], + $value['format'] ?? null, ); } else { throw $e; @@ -163,9 +164,9 @@ public static function fromFileInterface(FileInterface $value): self /** * Creates a placeholder image based on the provided image dimensions. */ - public static function fromDimensions(int $width, int $height): self + public static function fromDimensions(int $width, int $height, ?string $format = null): self { - return new PlaceholderImage($width, $height); + return new PlaceholderImage($width, $height, $format); } public function getAlternative(): ?string