...
player_img = pygame.image.load(os.path.join(img_folder, 'p1_jump.png')).convert()
player = Player(player_img)
...
...
class Player(pygame.sprite.Sprite):
def __init__(self, player_img):
pygame.sprite.Sprite.__init__(self)
self.image = player_img
...