Improved image uploading

Uses smaller images to reduce memory