Skip to content

Commit

Permalink
Add canvas thumbnail for single images
Browse files Browse the repository at this point in the history
  • Loading branch information
hadro committed Jul 28, 2023
1 parent 55b9ead commit 46afe36
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion iiify/resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,11 +269,20 @@ def singleImage(metadata, identifier, manifest, uri):
imgId = f"{identifier}/{fileName}".replace('/','%2f')
imgURL = f"{IMG_SRV}/3/{imgId}"


thumbnail = [{
"id": f"https://archive.org/download/{identifier}/__ia_thumb.jpg",
"type": "Image",
"format": "image/jpeg",
}]

manifest.make_canvas_from_iiif(url=imgURL,
id=f"https://iiif.archivelab.org/iiif/{identifier}/canvas",
label="1",
anno_page_id=f"{uri}/annotationPage/1",
anno_id=f"{uri}/annotation/1")
anno_id=f"{uri}/annotation/1",
thumbnail=thumbnail)


def addMetadata(item, identifier, metadata, collection=False):
item.homepage = [{"id": f"https://archive.org/details/{identifier}",
Expand Down

0 comments on commit 46afe36

Please sign in to comment.