Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use thumbnails for big images #23

Merged
merged 2 commits into from
Jan 3, 2017
Merged

Conversation

penguin42
Copy link
Contributor

If the image size is too large (as indicated by the metadata in the event) use a thumbnail.

Allow downloading of a thumbnail for a file.
Note: Synapse really doesn't like it if you don't specify
the height (I get a 500); so the caller has to give some
guess of dimensions, but the server gives something
reasonable.

Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
When we decide from the image info that an image is too large,
try a thumb instead.
Pick 640x480 because
  a) we need to pick a size and
  b) That's the right size.
  c) We should make it configurable.

(We could also try this if we didn't have the image info when
we get the error).

Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
@richvdh
Copy link
Member

richvdh commented Jan 3, 2017

great, thank you!

@richvdh richvdh merged commit 8ec99c5 into matrix-org:master Jan 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants