easy-thumbnails icon indicating copy to clipboard operation
easy-thumbnails copied to clipboard

Can't get generated thumbnail from S3. thumbnail_url return empty string

Open pnhegde opened this issue 7 years ago • 0 comments

When I upload an image from django admin, thumbnails are generated and stored in S3. While reading the same thumbnails I get empty string for all aliases. I have a global THUMBNAIL_ALIASES

THUMBNAIL_ALIASES = { '': { 'icon': {'size': (50, 0), 'crop': True}, 'square': {'size': (100, 100), 'crop': True}, 'avatar': {'size': (200, 0), 'crop': True}, }, }

and image field in the model

picture = ThumbnailerImageField('Profile picture', upload_to=partial(get_file_path, prefix='profile_pics'), null=True, blank=True)

. I make use of DRF APIs for uploading pics from frontend and it works fine. When I upload an image from django admin, thumbnail_url(instance, 'icon') returns empty string. This happens only with S3 storage. Local storage works fine. THUMBNAIL_DEBUG didn't help as there was no error in the log.

pnhegde avatar May 01 '18 08:05 pnhegde