diff --git a/src/bundle/Resources/public/js/CKEditor/embed/image/embed-image-editing.js b/src/bundle/Resources/public/js/CKEditor/embed/image/embed-image-editing.js index b04bcc81..4f883037 100644 --- a/src/bundle/Resources/public/js/CKEditor/embed/image/embed-image-editing.js +++ b/src/bundle/Resources/public/js/CKEditor/embed/image/embed-image-editing.js @@ -90,6 +90,11 @@ class IbexaEmbedImageEditing extends Plugin { dispatcher.on('attribute:previewUrl', (event, data, conversionApi) => { const downcastWriter = conversionApi.writer; const modelElement = data.item; + + if (!modelElement.getAttribute('previewUrl')) { + return; + } + const viewElement = conversionApi.mapper.toViewElement(modelElement); const preview = downcastWriter.createUIElement( 'img',