code: def parse_buffer_to_jpeg(data):
      
  
      return [
          Image.open(BytesIO(image_data + b'\xff\xd9'))
          for image_data in data.split(b'\xff\xd9')[:-1] # Last element is obviously empty
      ]
docs: Parse JPEG file bytes to Pillow Image