Add class to image's parent