Poop pic

My 1 yr old son is on an antibiotic for an ear infection. He has been on them for 5 days today. He has been pooping/ farting small amounts of yellow slimy poop. His butt is red and I have been applying butt paste & awuaphore during all changes. Is this due to the meds or another underlying issue??