title: Pygame - Loading images in sprites
body: <p>How do I load an image into a sprite instead of drawing a shape for the sprite?
  Ex: I load a 50x50 image into a sprite instead of drawing a 50x50 rect</p>
  
  <p>Here is my sprite code so far:</p>
  
  <pre><code>class Player(pygame.sprite.Sprite):
  
      def __init__(self, color, width, height):
  
          super().__init__()
          #Config
          self.image = pygame.Surface([width, height])
          self.image.fill(WHITE)
          self.image.set_colorkey(WHITE)
  
              # Draw
          pygame.draw.rect(self.image, color , [0, 0, width, height])
  
          # Fetch
          self.rect = self.image.get_rect()
  
      def right(self, pixels):
          self.rect.x += pixels
      def left(self, pixels):
          self.rect.x -= pixels
      def up(self, pixels):
          self.rect.y -= pixels
      def down(self, pixels):
          self.rect.y += pixels
  </code></pre>