arky
(Arky)
February 2, 2022, 7:29am
#1
Am trying to reuse the default icons from volto package in custom view. The image SVG are rendered as JS objects in render HTML.
import userSVG from '@plone/volto/icons/user.svg';
...
<Image src={ userSVG } />
<img src="[object Object]" class="ui image">
ksuess
(Katja Süss)
February 2, 2022, 7:44am
#2
import { Icon } from '@plone/volto/components';
import userSVG from '@plone/volto/icons/user.svg';
<Icon name={searchSVG} />
arky
(Arky)
February 2, 2022, 7:50am
#3
To give you more context. I am trying to use 'user.svg' as source for Semantic-UI Image element.
@arky I don't think it's possible, those svgs are not loaded with the fileloader . You can make something appear to be an Image by adding the "ui image" classes, like <div className="ui image"><Icon name={} /></div>
arky
(Arky)
February 2, 2022, 12:32pm
#5