`Image` does not accept URLs, only data
See original GitHub issueHey,
I think I found a bug with Image
.
The ipywidget version of Image
does not display an image, i.e., you get the broken link image symbol.
from ipywidgets import Image
Image(url='http://history.nasa.gov/ap11ann/kippsphotos/5903.jpg')
Whereas the IPython Image
version does work.
from IPython.display import Image
Image(url='http://history.nasa.gov/ap11ann/kippsphotos/5903.jpg')
I also have the same problem when showing local images Image(filename="image.jpg")
.
I’m using the following version
>>> import ipywidgets
>>> ipywidgets.__version__
'4.1.1'
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How to handle loading of images that may not exist?
An image URL that is incorrect or points to an image that no longer exists, is most likely a data issue. So the...
Read more >Data URLs - HTTP - MDN Web Docs - Mozilla
Data URLs, URLs prefixed with the data: scheme, allow content creators to embed small files inline in documents. They were formerly known as ......
Read more >How to fix: Processing failed: image link [image_link ...
Ensure that your URL links lead to an image and not to a web page. If you change the image, but keep the...
Read more >android - Images Not Loading from URL - Stack Overflow
I am trying to load some images into a list view using Picasso but I'm only seeing my placeholder image. I'm loading the...
Read more >Data URIs | CSS-Tricks
Did you know that you don't have to link to an external image file when using an <img> element in HTML, or declaring...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
What do you mean with “image data”? A numpy array?
Image(filename="image.jpg")
is also not accepted.If
url
is not an accepted argument then Image should throw an exception ifurl
is specified.https://github.com/ipython/ipywidgets/blob/master/ipywidgets/widgets/widget_image.py#L36
Traitlet bytes, which means the value must be python
bytes
, the image data.The format can be specified via the format traitlet:
https://github.com/ipython/ipywidgets/blob/master/ipywidgets/widgets/widget_image.py#L31