You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm aware that you can globally configure for all images (even PNGs with alpha) to be converted to JPG by adding this to your settings.py
THUMBNAIL_TRANSPARENCY_EXTENSION = 'jpg'
But the problem is that I don't want to force ALL of my images in all the models to be converted to JPG because I have some models that require images with alpha (png).
What I want is to force a single field in a single model to convert to JPG all images no matter if they are PNGs with alpha enabled.
class Article(BaseModel):
title = models.CharField(max_length=255, unique=True)
image = ThumbnailerImageField(upload_to='blog/articles/image')
I want this because many people are uploading PNG's with alpha enabled and this is preventing the Thumbnailer to compress them as JPG making many of the thumbnails remain as PNG's (500kb) instead of being converted to JPG (70kb).
How can I specify to always convert these article images to JPG?
The text was updated successfully, but these errors were encountered:
I'm aware that you can globally configure for all images (even PNGs with alpha) to be converted to JPG by adding this to your settings.py
THUMBNAIL_TRANSPARENCY_EXTENSION = 'jpg'
But the problem is that I don't want to force ALL of my images in all the models to be converted to JPG because I have some models that require images with alpha (png).
What I want is to force a single field in a single model to convert to JPG all images no matter if they are PNGs with alpha enabled.
I want this because many people are uploading PNG's with alpha enabled and this is preventing the Thumbnailer to compress them as JPG making many of the thumbnails remain as PNG's (500kb) instead of being converted to JPG (70kb).
How can I specify to always convert these article images to JPG?
The text was updated successfully, but these errors were encountered: