VlaamseKunstcollectie / Imagehub

A IIIF Presentation API compliant aggregator and web service
GNU General Public License v3.0
1 stars 2 forks source link

create thumbnails from the startCanvas image URL #22

Closed Hobbesball closed 5 years ago

Hobbesball commented 5 years ago

Detailed description of the issue. Thumbnails of images need to be generated to populate the search results page of the Arthub. For this we need links to Cantaloupe image URLs that correspond with the startcanvas image of a work.

Additional context Currently, thumbnails are generated based on the work ID of an object, using it to form a valid URL pointing to an image on the old VKC website. Currently, images use a new VKC image ID which can't be derived from the work PID. there needs to be a way to link to these VKC Image IDs from LIDO XML.

Possible implementation at the end of the generate-manifests command, when writing the manifest.json file into LIDO XML, take the startCanvas image URI value from manifest.json and write it into a ResourceSet of the LIDO file. Follow this structure:

<lido:resourceWrap>

   <lido:resourceSet>

      <lido:resourceID lido:type="purl" lido:source="Imagehub">

https://imagehub.vlaamsekunstcollectie.be/iiif/2/100000022

      </lido:resourceID>

      <lido:resourceType>

          <lido:term lido:pref="preferred">thumbnail  
          </lido:term>

      </lido:resourceType>

   </lido:resourceSet>

</lido:resourceWrap>
Kitania commented 5 years ago

Added in 2306938861d0b4b49ffa34825310431c1867b0c9

When deploying and testing the new code, make sure you have an OAuth client set up in your local Datahub and have added the Datahub username, password and OAuth client public ID & secret into your parameters.yml. You also need to make sure to strip the '/oai' at the end of the datahub_url parameter.