Skip to content

Setting a channel thumbnail as an SVG via ricecooker breaks publishing #5114

Open
@sentry-io

Description

@sentry-io

This seemed to have been caused by using an SVG image as the thumbnail for a channel. It's possible this would impact other thumbnails too. Ideally, setting as an SVG would be fine, and it would just be appropriately converted to a PNG on publish.

Sentry Issue: STUDIO-HV3

UnidentifiedImageError: cannot identify image file <File: /tmp/tmp8glzgicl>
(3 additional frame(s) were not displayed)
...
  File "contentcuration/viewsets/channel.py", line 528, in publish
    channel = publish_channel(
  File "contentcuration/utils/publish.py", line 935, in publish_channel
    set_channel_icon_encoding(channel)
  File "contentcuration/utils/publish.py", line 759, in set_channel_icon_encoding
    channel.icon_encoding = convert_channel_thumbnail(channel)
  File "contentcuration/utils/publish.py", line 779, in convert_channel_thumbnail
    return get_thumbnail_encoding(channel.thumbnail)
  File "contentcuration/utils/files.py", line 112, in get_thumbnail_encoding
    with Image.open(inbuffer) as image:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions