Thumbnails: Check <oc:has-preview> property - #217
Conversation
...instead of assuming it from the mime type to be an image. This fixes (for example) preview for .txt files
|
@zerox80 Aren't those x and y way too big? Sample URL: Comes from buildPreviewUri function.
web UI also uses high values though: &x=1000&y=1000 TODO: Find out why web UI uses &processor=fit Are we potentially wasting bandwidth here both in App and Web UI @micbar ? |
wernrab
left a comment
There was a problem hiding this comment.
Looks consistent (besides the big x and y values discussed)
It looks like the vaues changed last time since I used it, now it's 320 320 @butonic @micbar @dschmidt Does the preview generating thingy on the backend pre create certain sizes we can request so they are more aligned/cached/whatever? OK there is documentation here. |
Yes, web has introduced some more resolutions and also adjusted the backend side defaults (see below).
No matter what sizes you request, you will only ever get one of the predefined resolutions back. At the moment that's the following list of resolutions: |
|
They are not pregenerated but they are cached after viewing a resolution for the first time. That being said, I think we should add more sizes to the default thumbnails_resolutions.. the existing ones don't really provide anything suitable for my upcoming Photos app opencloud-eu/web-extensions#529 |
|
Ah, I wasn't aware we already had the new resolutions in the default config - those help, yeah :) |
Yeah we also had the issue in web, that for "normal sized tiles in the tiles view" the images returned from the backend were ridiculously large. 馃槄 |
|
@JammingBen Regarding https://github.com/opencloud-eu/opencloud/pull/3386/changes ... iOS is requesting either 120x120 or 180x180 depending on device pixels. (might even be 60x60 on old phones!?) Do you have a proposal how to align this? Which processor= shall I use? I guess 'fit' like in webinterface, right now iOS and Android specify neither and images just display part of it. |
You can keep requesting those sizes, the server will pick one of the next entries from the list. Which one depends on if the image is portrait or landscape. The server matches the longer side I believe (though there are times where I don't quite understand the matching exactly). So requesting Requesting
I'd rather not introduce more small steps if there is not a good reason to do so. It's not meant to have one exact matching config for each requested size. You can maybe look at it as "quality steps". More config options would offer more granular quality (and therefore size) control, but also less efficient caching.
It depends on the use case, |

...instead of assuming it from the mime type to be an image. This fixes (for example) preview for .txt files.
Found this thanks to this iOS(!) issue: opencloud-eu/ios#72
Introduced by @micbar in opencloud-eu/reva#214