Skip to content

Commit 0edcd20

Browse files
Nazar65David Verholen
authored and
David Verholen
committed
Fix issue - Image custom attribute type could not display on frontend.
1 parent 908a6bb commit 0edcd20

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

app/code/Magento/Eav/Model/Entity/Attribute.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,12 @@ public function beforeSave()
295295
}
296296
}
297297

298+
if ($this->getFrontendInput() == 'media_image') {
299+
if (!$this->getFrontendModel()) {
300+
$this->setFrontendModel(\Magento\Catalog\Model\Product\Attribute\Frontend\Image::class);
301+
}
302+
}
303+
298304
if ($this->getBackendType() == 'gallery') {
299305
if (!$this->getBackendModel()) {
300306
$this->setBackendModel(\Magento\Eav\Model\Entity\Attribute\Backend\DefaultBackend::class);

0 commit comments

Comments
 (0)