acdh-oeaw / arche-thumbnails
Thumbnails service for the ARCHE Suite
Requires
- ext-imagick: *
- ext-pdo: *
- ext-pdo_sqlite: *
- ext-yaml: *
- acdh-oeaw/arche-diss-cache: ^0.9
- acdh-oeaw/arche-lib: ^7
- guzzlehttp/guzzle: ^7
- zozlak/logging: ^1
Requires (Dev)
- phpstan/phpstan: *
- phpunit/phpunit: ^11.4
README
An ARCHE dissemination service providing thumbnails for resources (so they can be nicely displayed in the GUI).
For images it simply provides thumbnails and for another resources it tries to do its best either by finding a connected image (e.g. with acdh:hasTitleImage
metadata link) or by rendering a content fragment (for text resources) or by providing an icon based on the resource type.
To speed things up it caches provided results.
It can be queried as {deploymentUrl}/{archeID}?{parameters}
, where
{archeId}
is either a full ARCHE resource id (e.g.https://id.acdh.oeaw.ac.at/Troesmis
) or an ARCHE resource id with the ACDH id namespace skipped (e.g.Troesmis
as the ACDH id namespace ishttps://id.acdh.oeaw.ac.at/
). In both cases the value should be properly URL encoded.- supported parameters are:
width
,height
- width and height of a thumbnail (in pixels)
Extending
Prepare a new class implementing acdhOeaw\repo\thumbnails\handler\HandlerInterface
and register it by addding mimeHandlers[]='yourClassName'
to the config.ini
.
For example implementations look into the src\acdhOeaw\repo\thumbnails\handler
folder.