Download and serve image or store link to image? Scale + Security
I think the best solution for this is to download the first image with BeautifulSoups (as you are currently doing) and then upload it to a CDN (like AmazonWS S3, Google Cloud Storage, etc) and save only the link to that image in your model. So the next time you view that link, you will just serve the image from your CDN.
This solution is very secure and can scale up!
I am building a webapp in Django that allows users to post links. When they post a link, I want to display a thumbnail image for the link. Right now, I simply download the first image on the linked page (using BeautifulSoup), store it in my Django model, and then serve it with the model. 
I am wondering whether this is the best solution, from both a scale and security perspective? Would a better solution be to simply store a link to the original image on the original website, and then have the user's browse simply request that image from the linked website?
Would the second solution be faster and safer than downloading all the images onto my server? I am also worried about whether downloading and serving thousands of images will scale, as well as how to protect the app from images on malicious sites.