diff --git a/packages/plugin-ext/src/plugin/webviews.ts b/packages/plugin-ext/src/plugin/webviews.ts index bef85108ebbea..7611998af941f 100644 --- a/packages/plugin-ext/src/plugin/webviews.ts +++ b/packages/plugin-ext/src/plugin/webviews.ts @@ -271,7 +271,11 @@ export class WebviewPanelImpl implements theia.WebviewPanel { set iconPath(iconPath: theia.Uri | { light: theia.Uri; dark: theia.Uri }) { this.checkIsDisposed(); if (URI.isUri(iconPath)) { - this.proxy.$setIconPath(this.viewId, (iconPath).path); + if ('http' === iconPath.scheme || 'https' === iconPath.scheme) { + this.proxy.$setIconPath(this.viewId, iconPath.toString()); + } else { + this.proxy.$setIconPath(this.viewId, (iconPath).path); + } } else { this.proxy.$setIconPath(this.viewId, { light: (<{ light: theia.Uri; dark: theia.Uri }>iconPath).light.path,