views:

198

answers:

1

Hi, Given a url to an image is there a way in Django/Python to pull this image in and then display it on my site (resized if possible)

Thanks

+3  A: 

If you just want to hotlink it print out the html snippet(<img src="http://example.com/img.png" width="100" height="100" />).

If you want to store in at your server and resize it on the server-side you might want to look into ImageMagick or PIL for processing and urllib or pycurl for downloading.

neo
thanks. think i was looking into it to deep trying to open it with Python :)
John