Fix GIF image size issue, try to be smarter about uploading images
Never scale an image larger than the original, fix bugs in uploading when replace is specified