new API for image upload implemented.