Skip to content

Commit e3134ea

Browse files
committed
Fix issue - Image custom attribute type could not display on frontend.
1 parent 0d99fa8 commit e3134ea

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
@@ -287,6 +287,12 @@ public function beforeSave()
287287
}
288288
}
289289

290+
if ($this->getFrontendInput() == 'media_image') {
291+
if (!$this->getFrontendModel()) {
292+
$this->setFrontendModel(\Magento\Catalog\Model\Product\Attribute\Frontend\Image::class);
293+
}
294+
}
295+
290296
if ($this->getBackendType() == 'gallery') {
291297
if (!$this->getBackendModel()) {
292298
$this->setBackendModel(\Magento\Eav\Model\Entity\Attribute\Backend\DefaultBackend::class);

0 commit comments

Comments
 (0)