hardened image uploading