Images stored in folder in github app not displaying


I have tried to deploy an app that creates an html table and displays images in the table. The images are in a folder in the github but are not showing up in the table.

Githhub: GitHub - apk2150/icsa_burgee_formatter

Thanks in advance!

Can you post a minimal reproducible code?

Hi @apk2150

As @ferdy suggested, sharing relevant minimum reproducible code snippets would help us in help you to diagnose the problem.

Based on the issue that youโ€™re facing as mentioned in the post title, it seems your images that are hosted in your GitHub repo is not showing.

Here are some things that you can try:

  • Make sure that the path is relative and enable the static file serving option as details in the following Docs page:
    Static file serving - Streamlit Docs
  • Alternative, you can use the image URL link to display this in app. To get the link you can right click on the image that gets rendered on GitHub and youโ€™ll get the following link (for out.png file):

And going to this URL in the browser gives us:

that we can then use in our app.

As for displaying images in an HTML table, you can check out the table_with_images method in streamlit-extras component:

Hope this helps!

Using the image URLs from git hub was an easy fix. Thank you so much!

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.