diff --git a/src/lib/FieldType/Image/Type.php b/src/lib/FieldType/Image/Type.php index c369118406..ef84995998 100644 --- a/src/lib/FieldType/Image/Type.php +++ b/src/lib/FieldType/Image/Type.php @@ -323,6 +323,7 @@ public function toHash(SPIValue $value) 'width' => $value->width, 'height' => $value->height, 'additionalData' => $value->additionalData, + 'mime' => $value->mime, ]; } @@ -387,6 +388,7 @@ public function fromPersistenceValue(FieldValue $fieldValue) ? $fieldValue->data['height'] : null), 'additionalData' => $fieldValue->data['additionalData'] ?? [], + 'mime' => $fieldValue->data['mime'] ?? null, ] ); diff --git a/src/lib/FieldType/Image/Value.php b/src/lib/FieldType/Image/Value.php index 4ca142d03b..d5cb87384a 100644 --- a/src/lib/FieldType/Image/Value.php +++ b/src/lib/FieldType/Image/Value.php @@ -93,6 +93,9 @@ class Value extends BaseValue /** @var string[] */ public $additionalData = []; + /** @var string|null */ + public $mime; + /** * Construct a new Value object. */