Fixes for image upload

Fixed image upload so it resamples it when resizing and retains both the
image-quality and alpha channel in .png & .gif