Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A request to use local images in the Timeline component #4

Open
SynchronyML opened this issue Jun 11, 2023 · 1 comment
Open

A request to use local images in the Timeline component #4

SynchronyML opened this issue Jun 11, 2023 · 1 comment

Comments

@SynchronyML
Copy link

Thanks a lot for the component, it helps me a lot to show my work, but I still have a need. For some reasons, I can only display some images locally, and I want to load them in the timeline.
However, limited by technology, according to the example.json file you provided, I have seen the method of importing images by url, but I have not seen the strategy of localization import. Please guide me.

   "title": {
        "media": {
          "url": "",
          "caption": " <a target=\"_blank\" href=''>credits</a>",
          "credit": ""
        },
        "text": {
          "headline": "Welcome to<br>TastePeptides-Meta",
          "text": "<p>A Timeline showcasing the development process of TastePeptides-Meta</p>"
        }
    },
@ajhiggins96
Copy link

Try this: https://docs.streamlit.io/develop/concepts/configuration/serving-static-files
After enabling static file serving as described, you can serve local images in your example as follows:
"url": "app/static/your_img.jpg"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants