Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Missing dependency for webp thumbnailing in Docker image #7694

Closed
@juhovan

Description

Description

PR #7586 added support for webp thumbnailing, but dockerfile is missing libwebp-dev which is required for Pillow to be able to handle webp images.

Steps to reproduce

  • Use official docker image (1.15.0)
  • Upload a webp image and you will get an error and Synapse will log:
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
StopIteration: True

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/synapse/http/server.py", line 81, in wrapped_request_handler
    await h(self, request)
  File "/usr/local/lib/python3.7/site-packages/synapse/rest/media/v1/upload_resource.py", line 86, in _async_render_POST
    media_type, upload_name, request.content, content_length, requester.user
  File "/usr/local/lib/python3.7/site-packages/synapse/rest/media/v1/media_repository.py", line 171, in create_content
    await self._generate_thumbnails(None, media_id, media_id, media_type)
  File "/usr/local/lib/python3.7/site-packages/synapse/rest/media/v1/media_repository.py", line 578, in _generate_thumbnails
    thumbnailer = Thumbnailer(input_path)
  File "/usr/local/lib/python3.7/site-packages/synapse/rest/media/v1/thumbnailer.py", line 40, in __init__
    self.image = Image.open(input_path)
  File "/usr/local/lib/python3.7/site-packages/PIL/Image.py", line 2896, in open
    "cannot identify image file %r" % (filename if filename else fp)
PIL.UnidentifiedImageError: cannot identify image file '/data/media_store/local_content/zE/eG/UpUBjEyPUTciGGeOzjHc'

Version information

  • Homeserver:

If not matrix.org:

  • Version: 1.15.0

  • Install method: Docker image

  • Platform:

Metadata

Assignees

No one assigned

    Labels

    A-Media-RepositoryUploading, downloading images and video, thumbnailingZ-Help-WantedWe know exactly how to fix this issue, and would be grateful for any contributionz-bug(Deprecated Label)z-p2(Deprecated Label)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions