title: display an image from web using IPython.display.image: sometimes work, sometimes not
body: <hr>
  
  <p><strong>This has been solved. As pointed by James in the comment, the link that does not work is not a direct link to an image.</strong></p>
  
  <hr>
  
  <p>I'm learning python through a ipython notebook online. In the ipython notebook, an image from web is displayed using IPython.display.image. I tried it on my laptop and it works. However, when I try to display other images from web, it does not work. </p>
  
  <p>The scripts that work is:</p>
  
  <pre><code>from IPython.display import Image
  url = 'http://upload.wikimedia.org/wikipedia/commons/5/56/Kosaciec_szczecinkowaty_Iris_setosa.jpg'
  Image(url,width=300, height=300)
  </code></pre>
  
  <p>The scripts that do not work (but show a broken image without any other outputs) is:</p>
  
  <pre><code>from IPython.display import Image                        
  url='https://en.wikipedia.org/wiki/Iris_setosa#/media/File:Kosaciec_szczecinkowaty_Iris_setosa.jpg'
  Image(url,width=300, height=300)
  </code></pre>
  
  <p>I saw two other related questions but they still do not answer my questions. </p>
  
  <p><a href="https://stackoverflow.com/questions/23173980/display-an-image-from-uri">Display an image from URL</a></p>
  
  <p><a href="https://stackoverflow.com/questions/3962180/how-to-display-an-image-from-web">How to display an image from web?</a></p>
  
  <p>Thank you very much!</p>