Search code examples
visual-studio-codevscode-extensions

Set icon or logo for extension in vscode


I've created an extension for vscode (not yet published, only installed localy), how can I set an icon to be seen in the section of the extensions in vscode?


Solution

  • You can set the icon in the extension's package.json file, which is also called "extension manifest".

    The field in which you set the path to an icon is called "icon". The icon file itself has to be 128x128 pixels. As noted by Philipp Kief in the comments, you should use a PNG file, not an SVG.

    Example:

    {
        "name": "extension-name",
        "displayName": "Extension Name",
        "description": "...",
        "icon": "images/spellIcon.png",
        "version": "0.0.1",
          ...
    

    More on VS Code's official page.