I need to copy a remote image (for example http://example.com/image.jpg) to my server. Is this possible?
How do you verify that this is indeed an image?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To download:
To verify can use PIL
If you just want to verify this is an image even if the image data is not valid: You can use imghdr
The method checks the headers and determines the image type. It will return None if the image was not identifiable.