How to include images in extensions

What’s the correct way to add an image in an extension such that it is properly packaged for runtime?

[original thread by Julien Eluard]

If you mean docker images, I don’t really understand what you are trying to do. The Theia framework allows you to create an http/ws server that will serve a web IDE in your browser. Anything related to containers is not directly in scope of the project AFAIK. If you are looking for a multi-container dev environment using a Theia application, maybe Che will be better suited?

[Julien Eluard]

No I meant just plain html images in my extension :slight_smile: Where should I place them so that they will be properly served by theia?

Oh my bad :slight_smile: You can inspire yourself from the following stylesheet:

From what I understand, you have to write .useable.css files, refering to your images, and require them from JavaScript. Then it is webpack magic, bundling your css + image references when building the frontend.

[Julien Eluard]

Thanks, it works!