-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Feature request: render-images in pins #31
Comments
Alright it seems I had not actually had the Doing this the images are rendered in the table, but it would be nice to see them in the pin also: |
You can use https://datasette.io/plugins/datasette-media to set up URLs that can serve images directly from BLOB columns, so you could use the combination of I wonder if this could be made simpler? |
The full sized images are actually stored on S3 in a private bucket, and these blobs are thumbnails for quick viewing. So it would be nice not to have the dependency on local files or public URL. Your suggestion of using Alternatively here is what I am doing in folium, which might be helpful? import folium
from folium import IFrame
# save thumbnail as 'tmp.jpg'
encoded = base64.b64encode(open('tmp.jpg', 'rb').read()).decode('UTF-8')
svg = f"""<object data="data:image/jpg;base64,{encoded}" width="1000" height="800 type="image/svg+xml"></object>"""
iframe = IFrame(svg, width=width*fat_wh, height=height*fat_wh)
popup = folium.Popup(iframe, parse_html = True, max_width=2000) |
Hi Simon
I have installed both this and
datasette-render-images
plugins and have a table with lat/lon and also a blob image I wish to display. However with both plugins installed the images are no longer rendered (they are if only render-images is installed). I assume there is some compatibility issue?Cheers
The text was updated successfully, but these errors were encountered: