Skip to content

Commit

Permalink
Merge pull request #274 from mbruegmann/master
Browse files Browse the repository at this point in the history
give MARKDOWNX_IMAGE_MAX_SIZE to save() method to ensure quality parameter is used when saving image
  • Loading branch information
adi- authored Jan 7, 2025
2 parents b20aa8c + b0c2a92 commit a4d3950
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion markdownx/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def _process_raster(image, extension):
"""
thumb_io = BytesIO()
preped_image = scale_and_crop(image, **MARKDOWNX_IMAGE_MAX_SIZE)
preped_image.save(thumb_io, extension)
preped_image.save(thumb_io, extension, **MARKDOWNX_IMAGE_MAX_SIZE)
thumb_io.seek(0, SEEK_END)
return thumb_io

Expand Down

0 comments on commit a4d3950

Please sign in to comment.