You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[EuiIcon] Would it be possible to have a rasterized version of the icons? #9839
Currently icons are svg images wrapped by a EuiIcon component which hides completely both icon svg file (behind icon name) and its loading state - there's an onIconLoad but the raw svg is not actually provided as argument.
Also, rasterized version can be safer to use within a canvas (Elastic Charts has to use DOM rendering for elements/components who use icons) or in some tools like Monaco who prefer rasterized versions over svgs.
Right now in Kibana Workflow to define a new step icon it needs to find the right svg inner path of the icon, load it async AND there's little piece of code to generate a rastered version of it as data URL.
Proposed Solution
I would like to discuss the possibility to provide a rasterized version of the icons (perhaps a png sprite?) with the EUI bundle.
Use Case
Icons in canvas charts native
Monaco autocomplete/inline rendering
Value / Impact
I think the main value would be the reduction of adhoc solutions all around Kibana, as everybody is probably reinventing the wheel to rasterize icons.
Urgency
No particular urgency, but wanted to start a discussion about it at least.
Do alternatives or workarounds exist?
There are few workarounds, but they bring either some maintanance cost AND are really not that solid.
Hey, @dej611! I'm personally not opposed to offering a consistent way to provide a rasterized version of the EUI icons, if that's something that's needed. However, I'm not entirely sure I understand the reasoning for it. You mention that it's safer/better for Elastic Charts and Monaco. Why is that? Is it needed for lazy loading? Some other reason? Also, we'd likely need to consider scaling concerns, if this is something we want to offer, as a rasterized image won't scale up well like a vector image will.
Why is that? Is it needed for lazy loading? Some other reason? Also, we'd likely need to consider scaling concerns, if this is something we want to offer, as a rasterized image won't scale up well like a vector image will.
I think even raw SVG could be fine. A rasterized version could be generated from it as long as its a pure SVG path, resolving the scaling concerns I think.
The current problem is that the EuiIcon callback provided for loading is not suitable for a range of use cases so a direct way to access to the image underneath would be easier.
I know right now there's a hacky way to do it, as we are already using it, but it would be nicer to have a proper/cleaner way to await import(svg/png file)
@dej611@MichaelMarcialis this is high effort and has to be discussed within my team but we could do something similar to @elastic/eui-illustrations (i.e. @elastic/eui-icons). A separate npm package that returns different formats: React components, SVGs, PNGs with different dimensions etc. This could be then supplied to our EuiIcon from @elastic/eui for rendering but could be used independently if needed. Low effort: we could bundle svgs... This definitely needs a spike.
Activity
weronikaolejniczak commentedon Jul 23, 2026
cc @elastic/eui-icons
MichaelMarcialis commentedon Jul 27, 2026
Hey, @dej611! I'm personally not opposed to offering a consistent way to provide a rasterized version of the EUI icons, if that's something that's needed. However, I'm not entirely sure I understand the reasoning for it. You mention that it's safer/better for Elastic Charts and Monaco. Why is that? Is it needed for lazy loading? Some other reason? Also, we'd likely need to consider scaling concerns, if this is something we want to offer, as a rasterized image won't scale up well like a vector image will.
dej611 commentedon Jul 27, 2026
I think even raw SVG could be fine. A rasterized version could be generated from it as long as its a pure SVG path, resolving the scaling concerns I think.
The current problem is that the
EuiIconcallback provided for loading is not suitable for a range of use cases so a direct way to access to the image underneath would be easier.I know right now there's a hacky way to do it, as we are already using it, but it would be nicer to have a proper/cleaner way to
await import(svg/png file)MichaelMarcialis commentedon Jul 27, 2026
@weronikaolejniczak, @mgadewoll: Did ya'll want to comment on the technical feasibility of this ask?
weronikaolejniczak commentedon Jul 27, 2026
@dej611 @MichaelMarcialis this is high effort and has to be discussed within my team but we could do something similar to
@elastic/eui-illustrations(i.e.@elastic/eui-icons). A separate npm package that returns different formats: React components, SVGs, PNGs with different dimensions etc. This could be then supplied to ourEuiIconfrom@elastic/euifor rendering but could be used independently if needed. Low effort: we could bundle svgs... This definitely needs a spike.feat(icons): bundle raw SVG files and JSON manifest in dist/