Skip to content

Add support for SVG in set_local_image #25

@tisto

Description

@tisto

Setting an SVG image in set_local_image:

{
  "@type": "Document",
  "set_local_image": {
    "preview_image": "image.svg"
  },
}

Leads to an error when running buildout:

ERROR:plone.namedfile.scaling:Could not scale "<plone.namedfile.file.NamedBlobImage object at 0x118e902e0>" of 'http:///video'
Traceback (most recent call last):
  File "/Users/timo/.buildout/eggs/plone.namedfile-5.4.0-py3.8.egg/plone/namedfile/scaling.py", line 249, in __call__
    result = self.create_scale(
  File "/Users/timo/.buildout/eggs/plone.namedfile-5.4.0-py3.8.egg/plone/namedfile/scaling.py", line 198, in create_scale
    return scaleImage(
  File "/Users/timo/.buildout/eggs/plone.scale-3.1.2-py3.8.egg/plone/scale/scale.py", line 57, in scaleImage
    image = PIL.Image.open(image)
  File "/Users/timo/.buildout/eggs/Pillow-6.2.2-py3.8-macosx-11-x86_64.egg/PIL/Image.py", line 2818, in open
    raise IOError("cannot identify image file %r" % (filename if filename else fp))
OSError: cannot identify image file <_io.FileIO name='/var/folders/_0/57n3vm9j04s63yq3twfxx9v00000gn/T/BUC6ajcg8vc' mode='rb' closefd=True>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions