Prevent empty images from being uploaded from gallery