Custom File Icon

I have a custom file extension, and I want to edit the file icon. Is that even possible?

You can add a cover icon by adding the coverImages property in your extension.json. Assign it to an array with objects with a path property (the path of your icon) and a label property (to show the description of the image if it doesn’t exist or load). Note that only the first item in the array is used for the icon.

Here is an example:

// extension.json
// { …
    "coverImages": [
        {
           path: "images/my-icon.png",
           label: "A cool icon!"
        }
    ],
// … }

That… Was not what they were asking. They were asking to change the icon on specific file types in the editor.

To be clear, they were not asking about Extensions but rather custom file extension icons.

2 Likes

Oops, my bad.

I don’t think there’s a way to add or customise existing file icons, probably have to wait when Replit adds the ability to customise the Replit UI.

2 Likes

They have codemirror support planned for replit extensions and along with that custom file icons will probably also come.

1 Like