minicomp / wax

Jekyll based framework for minimal exhibitions with IIIF 🐝
https://minicomp.github.io/wax/
MIT License
160 stars 84 forks source link

image metadata output different for iiif vs simple #93

Closed leucotic closed 3 years ago

leucotic commented 4 years ago

The Simple image derivative script seems to output a different image metadata path than the IIIF script to the csv and other files, which breaks the search thumbnail preview.

IIIF: "/img/derivatives/iiif/images/obj4/full/250,/0/default.jpg",/img/derivatives/iiif/obj4/manifest.json,"/img/derivatives/iiif/images/obj4/full/1140,/0/default.jpg"

Simple: img/derivatives/simple/obj11/thumbnail.jpg,img/derivatives/simple/obj11/fullwidth.jpg

the IIIF script puts a / in front of img. (It also includes quotations, which I'm not sure make a huge difference). The Simple script breaks the thumbnail display in the search page because it's missing that / and the path ends up running together like localhost:4000/waximg/derivatives/... instead of localhost:4000/wax/img/derivatives/...

The thumbnail images don't show up on the search page and jekyll gives this error (showing the path name run-in without the /): ERROR '/waximg/derivatives/simple/obj11/thumbnail.jpg' not found.

I was able to manually fix the thumbnail error by adding slashes to all the thumbnail pathways in the search/index.json, but it would be extremely annoying to do if I had a lot more images. Both the scripts should output the same path format.

mnyrop commented 4 years ago

@leucotic you 100% caught a bug, thanks for the heads up! if you need a less tedious fix while I work on a patch in the wax_tasks gem, you can temporarily fix this in your site by adding a slash between ${url} and ${item.thumbnail} in assets/search-ui.js:

https://github.com/minicomp/wax/blob/main/assets/search-ui.js#L14

(I'll leave this issue open until I release the patch.)

leucotic commented 4 years ago

Thank you! I will try that. (I'm just learning the framework for now and gathering materials for a collection, I don't have a live site yet, but I will soon, hopefully!)

mnyrop commented 3 years ago

This has been fixed in wax_tasks#74 and released on rubygems.org. bundle update wax_tasks will pull in the newest version 1.1.5