django-resized icon indicating copy to clipboard operation
django-resized copied to clipboard

JPEG format is always enforced even if DJANGORESIZED_DEFAULT_FORCE_FORMAT is set to None.

Open Raxev opened this issue 2 years ago • 1 comments

Hi @Gagaro , I was wondering if there is a way for the filename extension/format to be left the way the image was uploaded.

If a PNG image is uploaded I would like the filename to remain "...png", same for jpeg or jpg. I thought the setting DJANGORESIZED_DEFAULT_FORCE_FORMAT = None would take care of this, but None always forces all images to be saved in JPEG format.

Raxev avatar Aug 16 '22 22:08 Raxev

The format should already be kept: https://github.com/un1t/django-resized/blob/master/django_resized/forms.py#L120

I added a test just now which seems to confirm it: https://github.com/un1t/django-resized/commit/4a8922138f04e2e5b97d7ca88193c185a38687f1 https://github.com/un1t/django-resized/actions/runs/2957700233

Does this happens to all of your PNG images? Do you have one you can give me in example?

Gagaro avatar Aug 30 '22 15:08 Gagaro