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

Preview API #3923

Closed
tobiasKaminsky opened this issue Mar 19, 2017 · 7 comments
Closed

Preview API #3923

tobiasKaminsky opened this issue Mar 19, 2017 · 7 comments

Comments

@tobiasKaminsky
Copy link
Member

tobiasKaminsky commented Mar 19, 2017

Currently we have a thumbnail API and a preview API, provided by gallery app.
In order to provide proper previews for the clients it would be nice to have a reliable API within the core part.

The API should do

  • give previews on "any" size
  • obey aspect ratio
  • give correct landscape/portrait orientation

@rullzer (cause we talked about it)
@oparoz as your gallery API is doing all those requirements already :)

@oparoz
Copy link
Member

oparoz commented Mar 19, 2017

Yes, the Preview API should be its own app and come with a provider manager and an API. The thumbnail API has too many issues.

@rullzer
Copy link
Member

rullzer commented Mar 19, 2017

So few things:

give previews on "any" size

Well this is hard. Or not hard but resource intensive. What the preview code does now is round either the width or the height to the nearest power of two (round up). We do this so save processing power. And lets face it if a client reqests a 230x230 image. And they get a 256x256 image then they can scale that down just fine.

Also the current codes obeys the maxWidth and maxHeight settings for previews.

obey aspect ratio

Well sure

give correct landscape/portrait orientation

Again, sure.

adjustable jpeg quality

That one I also find a bit tricky. Because you don't want your server to generate the same preview 5 times. Just because user1 has a quality of 90%, user2 of 85% etc.

So long story short. I think a dedicated endpoint is a good idea (webdav?). But lets not get to fancy with all the options. What you want it to request a preview of a given size and then get something fast. And not download a 2048x2048 image if all you wanted was a 100x100 image.

@tobiasKaminsky
Copy link
Member Author

The options were just a quick thought, so I am fine with whatever I get ;-)
Rounding to the nearest preview is of course fine
Same for quality, some sane default should be enough 👍

@tobiasKaminsky
Copy link
Member Author

Yes, the Preview API should be its own app and come with a provider manager and an API

Would it then be shipped and enabled by default? Otherwise I would need something to check, e.g. in capabilities?

@oparoz
Copy link
Member

oparoz commented Mar 19, 2017

Otherwise I would need something to check, e.g. in capabilities?

Probably the best way.
Currently admins can completely disable previews and uninstall Gallery.

@tobiasKaminsky
Copy link
Member Author

Easiest and "best" for me/user experience would be if it cannot be disabled ;-)

@rullzer
Copy link
Member

rullzer commented Aug 8, 2018

This can be clsoed I believe.

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

5 participants