From 986175e724d7c24d8fb64b4f6854ab348f35a41b Mon Sep 17 00:00:00 2001 From: Olivier Leger Date: Mon, 25 Sep 2023 10:19:08 -0400 Subject: [PATCH] Bypass Django Markdownx image resizing on upload --- kobo/apps/markdownx_uploader/forms.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/kobo/apps/markdownx_uploader/forms.py b/kobo/apps/markdownx_uploader/forms.py index 11604db13c..fab393499a 100644 --- a/kobo/apps/markdownx_uploader/forms.py +++ b/kobo/apps/markdownx_uploader/forms.py @@ -23,3 +23,10 @@ def save(self, commit=True): return reverse( 'markdownx-uploader-file-content', args=(image_object.content.name,) ) + + @staticmethod + def _process_raster(image, extension): + """ + Bypass markdownx resizing and upload image as-is + """ + return image