Hello Folks,
I would like to announce a newly developed Islandora module,
Islandora Default Thumbs. The module is intended to allow the configuration and replacement of solution pack provided default thumbnails, but can be used to replace any thumbnail used by an object on a content model basis. This replacement is non destructive to existing objects thumbnail data streams, and will only affect the display layer thumbnails.
I have submitted a pull request to islandora-Labs
here. Many improvements are already under development, exposing even more configuration options per content model such as:
- Individual content model image comparisons
- Content model specific default thumbnail data streams configuration
- Forcing individual content models to use a supplied image regardless of its source
So, how does it work? When a comparison image is added to the Islandora Default Thumbs configuration the image files MD5 hash is saved for comparison. When an objects thumbnail is being viewed by SPARQL (Legacy), SPARQL, SOLR display generation or the compound object navigation block, the objects thumbnail data stream content is compared via MD5 hash to the supplied comparison image. Should they match, the configured CModel image replacement will be used in its place, or the configured missing thumbnail data stream replacement.
This technique is being done by implementing the following hooks:
- hook_preprocess_islandora_basic_collection_grid()
- hook_preprocess_islandora_basic_collection()
- hook_preprocess_islandora_objects_grid()
- hook_preprocess_islandora_objects_list()
- hook_preprocess_islandora_solr()
- hook_preprocess_islandora_compound_prev_next()
Checkout the README on the modules
README for more information.
Thanks,
Morgan Dawe