diff options
author | Mark Haines <mark.haines@matrix.org> | 2015-08-12 10:54:38 +0100 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2015-08-12 10:54:38 +0100 |
commit | 7e3d1c7d92157a3cce8ed975f2a982a6a80693d0 (patch) | |
tree | 01c0e4dcd8c1fa6dcd7290b3c433665aa02d5dd0 /synapse/config/repository.py | |
parent | Factor out thumbnail() (diff) | |
download | synapse-7e3d1c7d92157a3cce8ed975f2a982a6a80693d0.tar.xz |
Make a config option for whether to generate new thumbnail sizes dynamically
Diffstat (limited to 'synapse/config/repository.py')
-rw-r--r-- | synapse/config/repository.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/synapse/config/repository.py b/synapse/config/repository.py index 6891abd71d..748dd14e23 100644 --- a/synapse/config/repository.py +++ b/synapse/config/repository.py @@ -22,6 +22,7 @@ class ContentRepositoryConfig(Config): self.max_image_pixels = self.parse_size(config["max_image_pixels"]) self.media_store_path = self.ensure_directory(config["media_store_path"]) self.uploads_path = self.ensure_directory(config["uploads_path"]) + self.dynamic_thumbnails = config["dynamic_thumbnails"] def default_config(self, config_dir_path, server_name): media_store = self.default_path("media_store") @@ -38,4 +39,11 @@ class ContentRepositoryConfig(Config): # Maximum number of pixels that will be thumbnailed max_image_pixels: "32M" + + # Whether to generate new thumbnails on the fly to precisely match + # the resolution requested by the client. If true then whenever + # a new resolution is requested by the client the server will + # generate a new thumbnail. If false the server will pick a thumbnail + # from a precalcualted list. + dynamic_thumbnails: false """ % locals() |