upload image connected to class