Allow Image Widget value to be an object in which case we use the '@id' for value of the Image Sidebar preview #6156
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@sneridagh I am not proposing we change the teaser preview_image widget however I was trying as a test bench for the new image widget what would be needed in order to remove the object browser widget and use the new image widget.
Given how the ImageWidget assumes the value is only a string and Teaser/ObjectBrowser always assumes an array of value 1 with an object I think the ImageWidget should be more flexible in displaying the "image preview" by checking the value for the array first result.
Taking the work from #6147 these changes would display the external images set as preview_image overrides, any image selected or any image uploaded.
What I would propose is to make the ImageWidget a bit more flexible as seen in the changes made here
packages/volto/src/components/manage/Widgets/ImageWidget.jsx
What do you think about my proposal?