I’m doing it to image uploads to prevent any embedded malicious code. Am I right in doing this?
But yeah my main question is how to actually do it, because I’ve never used ImageMagick before – I’ve just installed it on my server.
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.
There is no way any code in images should be able to execute itself on your server. Unless you actually parse images for code on request (never do that), you’re far better & efficient off just serving the images (do not
include()them in any code of course), just add them to the browser), and let virus-scanning software scan newly uploaded images in the background, with clamav for instance.