Closed mamico closed 3 years ago
Looks okay. But can you say what goes wrong without this? Do you get errors? Are images not getting scaled correctly?
I have an imageScale from a field image of a persistent tile (https://github.com/plone/plone.app.tiles/blob/master/plone/app/tiles/imagescaling.py#L46), when I call the tag method (or the url method) this is the traceback:
...
return img.tag(**kwargs)
File "/var/tmp/eggs/plone.namedfile-5.4.0-py2.7.egg/plone/namedfile/scaling.py", line 118, in tag
srcset_attr = self.srcset_attribute()
File "/var/tmp/eggs/plone.namedfile-5.4.0-py2.7.egg/plone/namedfile/scaling.py", line 79, in srcset_attribute
for scale in self.srcset:
AttributeError: 'ImageScale' object has no attribute 'srcset'
... and my tile rendering is broken ...
Small fixes to
imagescaling
: missingsrcset
initialization, and wrong scale arguments (according to latest p.namedfile).Added test for
imagescaling
module.