Skip to content
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 opened this issue Jun 13, 2020 · 1 comment · Fixed by #7791
Closed

Missing dependency for webp thumbnailing in Docker image #7694

juhovan opened this issue Jun 13, 2020 · 1 comment · Fixed by #7791
Labels
A-Media-Repository Uploading, downloading images and video, thumbnailing z-bug (Deprecated Label) Z-Help-Wanted We know exactly how to fix this issue, and would be grateful for any contribution z-p2 (Deprecated Label)

Comments

@juhovan
Copy link
Contributor

juhovan commented Jun 13, 2020

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:
@clokep clokep added z-bug (Deprecated Label) z-p2 (Deprecated Label) labels Jun 15, 2020
@clokep
Copy link
Member

clokep commented Jun 15, 2020

Thanks for the bug report. Any chance you could put up a PR adding this to the docker file?

@clokep clokep added the Z-Help-Wanted We know exactly how to fix this issue, and would be grateful for any contribution label Jun 16, 2020
@MadLittleMods MadLittleMods added the A-Media-Repository Uploading, downloading images and video, thumbnailing label Jun 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Media-Repository Uploading, downloading images and video, thumbnailing z-bug (Deprecated Label) Z-Help-Wanted We know exactly how to fix this issue, and would be grateful for any contribution z-p2 (Deprecated Label)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants