improved image upload support