Hi I have the following code
@hug.get('/getgif', output=hug.output_format.image('gif'))
def get(username: str, password: str):
dir_path = os.path.dirname(__file__)
img_path = os.path.join(dir_path, 'animation.gif')
img = Image.open(img_path)
return img
I am using hug, python3 and PIL to create a response. The image returned to my browser does not anmiate at all. I am guessing PIL only takes the first frame of the GIF image and return that. Is there any alternative to stream the whole GIF image back to browser?