Handle image uploading.