I am working on an RSS reader using SimplePie.
I want to pull in RSS feeds and display articles with thumbnails. I am using RSS Enclosures and will later parse RSS <items> for <img>’s.
Is there a safe way to download these remote images to my server so I can cache them and resize them?
I have some ideas about how it can be done with cURL for instance, but I’m interested in security. I know I can restrict by file extension and I could probably look at the MIME type, but I just want to know if this is at all feasible/safe. If so, what steps should be taken to ensure there are no vulnerabilities.
Resize Images With gd or imagemagick
or you can do it in this way Check out the following Link