Reputation: 2520
I have stored a bunch of images on google drive via the Desktop app under G:\google_drive\sdr\pos.
The images names are stored in a database (image1.png, image2.png, image3.png).
How can I use an url and display the images in my streamlit app? The google drive url does not contain the image file name: https://drive.google.com/file/d/1AWhXeAGB8qBWe9kItc5zW9eLytIguOQF/view
How to link the url automatically to the image files?
Upvotes: 0
Views: 535
Reputation: 1470
You'll need to format the URL using a different structure, I found some examples,
1AWhXeAGB8qBWe9kItc5zW9eLytIguOQF
.https://drive.google.com/uc?export=view&id=YOUR_ID
https://drive.google.com/uc?export=view&id=1AWhXeAGB8qBWe9kItc5zW9eLytIguOQF
Sample:
Code:
<img src="https://drive.google.com/uc?export=view&id=1AWhXeAGB8qBWe9kItc5zW9eLytIguOQF">
I found this solution here.
Upvotes: 0