Adding icons in Extension

I’m trying to add svg icon in an extension using the following code:

ui.get_custom_glyph_code(“my_icon.svg”)

The icon is in the same path as extension.py but it always displays the question mark (?). I tried changing the path and different svg icons but the same issue occurs.

Any help would be much appreciated here.

Thanks

Hi @farman.ahmed. Have you tried providing an absolute path?