fix problem with image format (JPG) not sending to server correctly