Improved ImageUploadField URL generation logic