Closed ichim-david closed 2 weeks ago
By adding a new attribute 'src' or 'url'
in object_browser
widget, we can refer to the link in the restapi and while rendering the Image
in teaser block we can use ternary conditions .
I'll link this issue to the PR for better understanding
By adding a new attribute
'src' or 'url'
inobject_browser
widget, we can refer to the link in the restapi and while rendering theImage
in teaser block we can use ternary conditions .I'll link this issue to the PR for better understanding
@Tishasoumya-02 I think you are going about this the wrong way.
It has todo with the preview_image and from the teaser you need to check if the value is internal if so flatten to url or simply serve it as is.
Look at the block data information and you will see that the external url is added in the first element of the preview_image
It would be ideal to check or make that objectBrowserWidget accept externalUrls using a prop. https://github.com/plone/volto/blob/51bdfa0bd4d1b3b726855da0a0e6ad2880271b29/packages/volto/src/components/manage/Widgets/ObjectBrowserWidget.jsx#L367
It would be ideal to check or make that objectBrowserWidget accept externalUrls using a prop.
@nileshgulia1 I don't understand what you mean, there is already support for passing allowExternals as seen here https://github.com/plone/volto/blob/main/packages/volto/src/components/manage/Blocks/Teaser/schema.js#L101 this is part of the problem of this ticket that you can add an external image but it's not used by the teaser to render it
Describe the bug Teaser allows external links for "Image override" however they do not render upon inserting these image links.
To Reproduce Go to https://light-theme.kitconcept.io/ since this is the only volto 18 test deployment and add a teaser, select Customize teaser content and insert any external images. Same behavior is seen with Volto 17 https://volto.demo.plone.org/
Expected behavior The image should be used for the teaser header image.
Screenshots![teaser-image-not-rendering](https://github.com/plone/volto/assets/152852/9cd3d33f-ba19-42f1-96b9-b0112aff6e5b)