feature(thumbnails): add the ability to define custom image processors (#7409)
* feature(thumbnails): add the ability to define custom image processors * fix(ci): add exported member comment * docs(thumbnails): mention processors in readme * fix: codacy and code review feedback * fix: thumbnail readme markdown Co-authored-by: Martin <github@diemattels.at> --------- Co-authored-by: Martin <github@diemattels.at>
This commit is contained in:
@@ -10,9 +10,9 @@ The relevant environment variables defining file locations are:
|
||||
- (2) `STORAGE_USERS_OCIS_ROOT`
|
||||
- (3) `THUMBNAILS_FILESYSTEMSTORAGE_ROOT`
|
||||
|
||||
(1) ... Having a default set by the Infinite Scale code, but if defined, used as base path for other services.
|
||||
(2) ... Source files, defaults to (1) plus path component, but can be freely defined if required.
|
||||
(3) ... Target files, defaults to (1) plus path component, but can be freely defined if required.
|
||||
(1) ... Having a default set by the Infinite Scale code, but if defined, used as base path for other services.
|
||||
(2) ... Source files, defaults to (1) plus path component, but can be freely defined if required.
|
||||
(3) ... Target files, defaults to (1) plus path component, but can be freely defined if required.
|
||||
|
||||
For details and defaults for these environment variables see the ocis admin documentation.
|
||||
|
||||
@@ -45,9 +45,20 @@ Various resolutions can be defined via `THUMBNAILS_RESOLUTIONS`. A requestor can
|
||||
|
||||
Example:
|
||||
|
||||
Requested: 18x12
|
||||
Available: 30x20, 15x10, 9x6
|
||||
Returned: 15x10
|
||||
Requested: 18x12
|
||||
Available: 30x20, 15x10, 9x6
|
||||
Returned: 15x10
|
||||
|
||||
## Thumbnail Processors
|
||||
|
||||
Image generation can be configured by defining different processors, following processors are available:
|
||||
|
||||
* `resize`
|
||||
* `fit`
|
||||
* `fill`
|
||||
* `thumbnail`
|
||||
|
||||
To apply one of those, a query parameter has to be added to the request, e.g. `?processor=fit`
|
||||
|
||||
## Deleting Thumbnails
|
||||
|
||||
|
||||
Reference in New Issue
Block a user