

def _generate_thumbnails(self, required_thumbnails):
    _thumbnails = {
        
    }
    for (name, opts) in six.iteritems(required_thumbnails):
        try:
            opts.update({
                'subject_location': self.subject_location,
            })
            thumb = self.file.get_thumbnail(opts)
            _thumbnails[name] = thumb.url
        except Exception as e:
            if filer_settings.FILER_ENABLE_LOGGING:
                logger.error('Error while generating thumbnail: %s', e)
            if filer_settings.FILER_DEBUG:
                raise
    return _thumbnails

dataset/ETHPy150Open django-leonardo/django-leonardo/leonardo/module/media/models/abstract.py BaseImage._generate_thumbnails/original