From daaf07b8ee7010e605f93ddd3108ffe551cdd57f Mon Sep 17 00:00:00 2001 From: RaduCristianPopescu <119046336+RaduCristianPopescu@users.noreply.github.com> Date: Wed, 20 Aug 2025 14:35:19 +0300 Subject: [PATCH 1/2] fix: fallback image in feedzy block --- js/FeedzyBlock/Editor.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/js/FeedzyBlock/Editor.js b/js/FeedzyBlock/Editor.js index 902c9ee2..a7b45b61 100644 --- a/js/FeedzyBlock/Editor.js +++ b/js/FeedzyBlock/Editor.js @@ -311,16 +311,22 @@ class Editor extends Component { getImageURL(item, background) { let url; - if (item.thumbnail && this.props.attributes.thumb === 'auto') { - url = item.thumbnail; + window.console.log(this.props.attributes); + window.console.log(item); + if ( + item.thumbnail && + this.props.attributes.thumb === 'auto' && + item.thumbnail !== item.default_img + ) { + url = item.thumbnail.replace(/http:/g, 'https:'); } else if (this.props.attributes.default) { url = this.props.attributes.default.url; + } else if (item.default_img) { + url = item.default_img; } else { url = window.feedzyjs.imagepath + 'feedzy.svg'; } - url = url.replace(/http:/g, 'https:'); - if (background) { url = 'url("' + url + '")'; } From 18da478c430fd0a4777759a43ecde126dacc7443 Mon Sep 17 00:00:00 2001 From: RaduCristianPopescu <119046336+RaduCristianPopescu@users.noreply.github.com> Date: Wed, 20 Aug 2025 14:37:01 +0300 Subject: [PATCH 2/2] fix: removed console messages --- js/FeedzyBlock/Editor.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/js/FeedzyBlock/Editor.js b/js/FeedzyBlock/Editor.js index a7b45b61..04703f51 100644 --- a/js/FeedzyBlock/Editor.js +++ b/js/FeedzyBlock/Editor.js @@ -311,8 +311,6 @@ class Editor extends Component { getImageURL(item, background) { let url; - window.console.log(this.props.attributes); - window.console.log(item); if ( item.thumbnail && this.props.attributes.thumb === 'auto' &&