Changes included to support image uploading