Commit 44e002ef authored by Konrad Mohrfeldt's avatar Konrad Mohrfeldt Committed by Robert

disable forced format conversions for images

Django-Imagekit is smart enough to detect the format from the source
file. One (any maybe the only) reason we forced PNG as format is that
our previous image conversion tool could not auto-detect the format but
we still wanted PNG images with transparency to be handled…
transparently :).

A nasty side-effect of the forced conversion is that JPEG images were
converted to PNG which sometimes increased the file size of these images
multiple orders of magnitude. Often a large portion of our page loading
times on the frontpage of stadtgestalten comes from these kind of
images. Format auto-detection should fix this.
parent bb4fe61e
......@@ -9,17 +9,17 @@ class Image(models.Model):
'gestalten.Gestalt', related_name='images', on_delete=models.PROTECT)
preview_api = ImageSpecField(
source='file', processors=[Transpose(), SmartResize(250, 250)], format='PNG')
source='file', processors=[Transpose(), SmartResize(250, 250)])
preview_content = ImageSpecField(
source='file', processors=[Transpose(), SmartResize(200, 200)], format='PNG')
source='file', processors=[Transpose(), SmartResize(200, 200)])
preview_gallery = ImageSpecField(
source='file', processors=[Transpose(), ResizeToFit(250)], format='PNG')
source='file', processors=[Transpose(), ResizeToFit(250)])
preview_group = ImageSpecField(
source='file', processors=[Transpose(), SmartResize(366, 120)], format='PNG')
source='file', processors=[Transpose(), SmartResize(366, 120)])
intro = ImageSpecField(
source='file', processors=[Transpose(), ResizeToFit(554)], format='JPEG')
source='file', processors=[Transpose(), ResizeToFit(554)])
sidebar = ImageSpecField(
source='file', processors=[Transpose(), ResizeToFit(313)], format='JPEG')
source='file', processors=[Transpose(), ResizeToFit(313)])
facebook_meta = ImageSpecField(
source='file', processors=[Transpose(), ResizeToFit(800)])
twitter_meta = ImageSpecField(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment