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

Provide image scaling via GET parameter #2273

Closed
stefan-niedermann opened this issue Sep 7, 2020 · 3 comments
Closed

Provide image scaling via GET parameter #2273

stefan-niedermann opened this issue Sep 7, 2020 · 3 comments

Comments

@stefan-niedermann
Copy link
Member

stefan-niedermann commented Sep 7, 2020

Attached images should be scalable via a parameter to reduce the size for previews.

Similar to the avatar endpoint one could add something like

https://<image-uri>/64

for a scaled down version of the image which fits into a 64x64 px square.

Alternatively a GET parameter like

https://<image-url>?size=64

would work, too.

Would also be needed for #1635 (comment) but since we have an Android client in the meantime, this might be even more important 😉

@juliusknorr
Copy link
Member

Makes sense 👍

@stefan-niedermann
Copy link
Member Author

We have to decide whether or not the image should be cropped.

Avatars are always quadratical, which makes it easy, but i guess most attached images are in formats like 4:3 or so because they are photos.

Since my intention is to use it as previews, i would prefer to first center-crop them before downscaling, otherwise the preview thumbnail grid will look a bit messy.

What do you think?

@juliusknorr
Copy link
Member

Once we have #2638 the files preview api can handle all of that, so let's close this here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants