Experimental change to image manipulation

This commit is contained in:
2025-02-02 23:14:10 +00:00
parent 89ef938af4
commit bd1488c78a
29 changed files with 2 additions and 2 deletions

4
src/projects.py Normal file → Executable file
View File

@@ -146,9 +146,9 @@ def image(image):
resized_img = BytesIO()
the_image.thumbnail(tuple(req_size))
the_image.save(resized_img, format='jpeg')
the_image.save(resized_img, format=the_image.format)
response = make_response(resized_img.getvalue())
response.headers.set('Content-Type', 'image/jpeg')
response.headers.set('Content-Type', f'image/{the_image.format}')
return response