I am trying to prevent image files that contain malicious embedded code from being uploaded to my site. Is there any way to do this by by somehow checking the image as it is uploaded or after it is uploaded before it is displayed again. I have had some preliminary thoughts of resizing the image or placing a watermark over it on the fly, but i still am not sure if that will prevent any of this arbitrary code from executing.
all help is appreciated. thanks in advance.