def render(self, context):
        generator_id = self._generator_id.resolve(context) if self._generator_id else DEFAULT_THUMBNAIL_GENERATOR
        dimensions = parse_dimensions(self._dimensions.resolve(context))
        kwargs = dict((k, v.resolve(context)) for k, v in
                self._generator_kwargs.items())
        kwargs['source'] = self._source.resolve(context)
        kwargs.update(dimensions)
        generator = generator_registry.get(generator_id, **kwargs)

        file = ImageCacheFile(generator)

        attrs = dict((k, v.resolve(context)) for k, v in
                self._html_attrs.items())

        # Only add width and height if neither is specified (to allow for
        # proportional in-browser scaling).
        if not 'width' in attrs and not 'height' in attrs:
            attrs.update(width=file.width, height=file.height)

        attrs['src'] = file.url
        attr_str = ' '.join((escape(k), escape(v)) % '%s="%s"' for k, v in
                attrs.items())
        return mark_safe('<img %s />' % attr_str)
dataset/ETHPy150Open matthewwithanm/django-imagekit/imagekit/templatetags/imagekit.py/ThumbnailImageTagNode.render/swapped operands of `%`