This is something which used to be simple in JupyterLab 1.x, but as far as I can tell isn’t easily accomplished in JupyterLab 2.x.
That said, I figured out a hack that will change the icons until a better solution is put in place:
In your CSS, hide the svg icon you want to change and set the background image of the container to your custom icon. For example, the main logo (chosen because the CSS selector is simple):
#jp-MainLogo {
background-image: url(images/custom-icon.png)
}
#jp-MainLogo > svg {
visibility: hidden;
}
This is not a good fix because the default icon is still there - just hidden. But it will effectively look like it changes the icon. I would love to know a better way to do this in JupyterLab 2.x.