menu
announcement

Spectrum is now read-only. Learn more about the decision in our official announcement.

Theia

Eclipse Theia - Cloud & Desktop IDE

Channels
Team

How to include images in extensions

December 2, 2019 at 1:51pm

How to include images in extensions

December 2, 2019 at 1:51pm
What's the correct way to add an image in an extension such that it is properly packaged for runtime?

December 2, 2019 at 3:43pm
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?
No I meant just plain html images in my extension :) Where should I place them so that they will be properly served by theia?
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.

December 3, 2019 at 9:49am
Thanks, it works!