# Static content for jupyterlab extension

**URL:** <https://discourse.jupyter.org/t/static-content-for-jupyterlab-extension/906>\
**Category:** JupyterLab\
**Created:** [April 29, 2019, 9:16am UTC](https://discourse.jupyter.org/t/static-content-for-jupyterlab-extension/906 "2019-04-29T09:16:30Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![ernstch](https://avatars.discourse-cdn.com/v4/letter/e/9de0a6/32.png) [@ernstch](https://discourse.jupyter.org/u/ernstch)\
**Post date:** [April 29, 2019, 9:16am UTC](https://discourse.jupyter.org/t/static-content-for-jupyterlab-extension/906/1 "2019-04-29T09:16:30Z")

</div>

Dear all,  
currently I try to find my way into Jupyterlab extension development. What I cannot figure out is how to include static html or image content with an extension.  
Let’s say, I want to modify the tutorial [https://jupyterlab.readthedocs.io/en/stable/developer/xkcd\_extension\_tutorial.html](https://jupyterlab.readthedocs.io/en/stable/developer/xkcd_extension_tutorial.html) to show a static image provided with my extension:

```
class XkcdWidget extends Widget {
  constructor() {
    ...
    this.img = document.createElement('img');
    this.img.className = 'jp-xkcdCartoon';
    this.img.src='/path/to/static/img.png';
    this.node.appendChild(this.img);

```

Where do I have to put /path/to/static/img.png relative to my extension? How does Jupyterlab know about this static path?

If I save the image at $CONDA\_PREFIX/share/jupyter/lab/static/img.png, it is accessible, but I want to include it in my extension.

Thank you  
Ernst

---

_[View the full topic](https://discourse.jupyter.org/t/static-content-for-jupyterlab-extension/906)._
