diff options
author | Erik Johnston <erikj@matrix.org> | 2023-08-30 15:18:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-30 15:18:34 +0100 |
commit | 3de82bb2af28f56696a79bf41ccffc81385b6e2c (patch) | |
tree | 13f12b42ca11ef4ba7ad8c8756bc05f50ed38263 /synapse/__init__.py | |
parent | Fix rare bug that broke looping calls (#16210) (diff) | |
download | synapse-3de82bb2af28f56696a79bf41ccffc81385b6e2c.tar.xz |
Gracefully handle failing to thumbnail images (#16211)
Diffstat (limited to 'synapse/__init__.py')
-rw-r--r-- | synapse/__init__.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/__init__.py b/synapse/__init__.py index 2f9c22a833..4a9bbc4d57 100644 --- a/synapse/__init__.py +++ b/synapse/__init__.py @@ -21,9 +21,14 @@ import os import sys from typing import Any, Dict +from PIL import ImageFile + from synapse.util.rust import check_rust_lib_up_to_date from synapse.util.stringutils import strtobool +# Allow truncated JPEG images to be thumbnailed. +ImageFile.LOAD_TRUNCATED_IMAGES = True + # Check that we're not running on an unsupported Python version. # # Note that we use an (unneeded) variable here so that pyupgrade doesn't nuke the |