Check the image size before going to upload it.