fixed image uploads, added mime type detection for images, added loading image for save