jhu-digital-manuscripts / AnIOp

to track the activities of the Mellon funded Annotation Interoperability project
0 stars 0 forks source link

Thumbnails don't show up in M3 demo viewer? #74

Closed jabrah closed 4 years ago

jabrah commented 4 years ago

image

Mirador doesn't seem to throw errors.

GroovinChip commented 4 years ago

I remember looking into this a while ago but I don't remember what I found out. I vaguely recall it had something to do with what Mirador expects from the thumbnail but I don't remember

markpatton commented 4 years ago

It must not l like the thumbnails in the IIIF Collection.

jabrah commented 4 years ago

It seems that if we change the thumbnail definitions from the IIIF image URL to a static image, it may work in the manifest list. For example:

https://image.library.jhu.edu/iiif/rose%2fSeldenSupra57%2fcropped%2fSeldenSupra57.001r

to

https://image.library.jhu.edu/iiif/rose%2fSeldenSupra57%2fcropped%2fSeldenSupra57.001r/full/,200/0/default.jpg

I changed the thumbnail['@id'] property on the Manifest to the latter and Mirador was able to do a thing.

image

I'm not sure how Mirador picks the thumbnails to display to the right of the title. I can try playing with a code change to the backend at some point

jabrah commented 4 years ago

Some more details:

Mirador 3 picks up the manifest's thumbnail (the one displayed on the left side of the title in the screenshot above) in this manifest selector: https://github.com/ProjectMirador/mirador/blob/master/src/state/selectors/manifests.js#L211-L242

The selector is used in the ManifestListItem container component https://github.com/ProjectMirador/mirador/blob/master/src/containers/ManifestListItem.js#L24, which supplies the props for the ManifestListItem component. The property is then directly inserted as the src attribute of an image tag: https://github.com/ProjectMirador/mirador/blob/master/src/components/ManifestListItem.js#L95

markpatton commented 4 years ago

Right. According to the specs the id should be to a full image. Then a service block can have the iiif image service. I can add this onto the bug fixes I'm doing.

markpatton commented 4 years ago

Interesting that for Mirador 2, the above works. Maybe because of our customizations?

jabrah commented 4 years ago

Going back to some random Mirador 2 branch in the official Mirador repo, it seems that the older viewer does prefer to use the IIIF service when available, over simply using the thumbnail ID (https://github.com/ProjectMirador/mirador/blob/release-2.x/js/src/manifests/manifest.js#L106). This differs from the behavior of the new viewer (https://github.com/ProjectMirador/mirador/blob/master/src/state/selectors/manifests.js#L211).

The IIIF spec provides no guidance on this behavior, so oh well

markpatton commented 4 years ago

I switched the thumbnails, and things work somewhat. In the manifest browser thumb on the left in the manifest browser works, but on the right there is an empty square.

Also looks like the test deployment is using iiif 3 instead of 2. Probably should be switched to 2.

jabrah commented 4 years ago

Must be something up with the test deploy. The manifest level thumbnails seem to be working now in my local dev instance

image