Notes with images in pybis

A data steward from BAM asked us about adding images as notes using pybis. After trying to debug it, it seems that it is indeed not working as it should be. I haven’t investigated it in detail, let me know if you need more details.

I will also copy-paste his message:

When creating objects in the UI (like samples), it´s possible to add notes that contain both text and pictures by simply dragging and dropping images. With pybis, it seems that only links to pictures can be added, not the images themselves. This makes the notes less readable and limits some automation use cases where we would really want the images directly embedded in the notes. (adding images as datasets with pybis works well, so the issue seems to be only with the notes)

Thanks :slight_smile:

I had the same task and found a solution. I will try to add it in a simplified version.

Assuming you have your images in the datasets:

  • download images and create a permanent link which is readable by openbis
  • use link to website with the image to display it in openbis textfield using html

I tried to add the code but it did not work. I could send it to you in a personal message.