2

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

1 Answer 1

4

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.

Sign up to request clarification or add additional context in comments.

1 Comment

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.