bplmaps / argomaps

1 stars 0 forks source link

Static image assests should be removed from repo except in cases where no IIIF service is available #27

Open garrettdashnelson opened 1 year ago

garrettdashnelson commented 1 year ago

Static image content should not be duplicated in the repo if it could be served directly from IIIF server.

For instance, the file https://github.com/bplmaps/argomaps/blob/master/static/content/blaskowitz-1.jpg should be removed from repo and references to it should replaced with:

https://iiif.digitalcommonwealth.org/iiif/2/commonwealth:z603vw05v/5787,1105,5748,7233/,1200/0/default.jpg

For handy cropping/resizing of IIIF images from endpoint, see https://geoservices.leventhalmap.org/iiif-tools/

diedrick commented 1 year ago

It took me a while to find URL where is this image shown...if you don't mind, please include the URL of where the image is seen on the site.

Now that I did find it, I see it's an Ala question, as it's a content image that's edited here: https://argo.stage.diedrick.com/admin/people.php/9 image Simply changing the url in that box to the one above would solve it next time we publish.

If there are other locations this is happening, we'd need URLs to try to help find the source to change.

almontg commented 1 year ago

I'll go through and fix these

almontg commented 1 year ago

Done

garrettdashnelson commented 1 year ago

Before this is closed, @diedrick can you please remove all superfluous static assets from the GitHub repo so they are no longer tracked in the commit tree

diedrick commented 1 year ago

I removed the images I could, but we don't have a systematic way to do this, and there's a lot more places we should add iiif images in the data.

So for example, in the Admin People section:: image there's two new fields that lets Ala add the iiif thumb and header image. We'll have to do that for any data source that has images attached, specifically: https://argo.stage.diedrick.com/admin/facets.php/1 https://argo.stage.diedrick.com/admin/timeline_eras.php/2

Then we'll have a better way to track what's actually being still used or not. When those are complete, tell me so I can start digging into it.

And we should make this a v2 thing since it'll be some work and this is a pretty minor change.

almontg commented 1 year ago

I'll start changing the header and thumbnail images (where appropriate) and let you know when it's done

almontg commented 1 year ago

Just popping in to say the images are now loading very slow, so I'm going to re-do the image URLs with ones that are not gigantic as I realized that's what I did the first time around

almontg commented 1 year ago

I've updated all the images in the people articles.

For the headers/thumbnails/other assets with a set image size, I'm having problems doing that with the IIIF cropping tool; I can select a max width or height for the crop but not a specific hxw ratio. I'm not sure if this will be a problem with the current set up — if I, for example, set the proper width, will the system be able to crop it to the proper height or will things get weird?

almontg commented 1 year ago

I've put in a sample IIIF link for a thumbnail image here: https://argo.stage.diedrick.com/admin/people.php/1

almontg commented 1 year ago

Worth noting that I'm also kind of picky about what is included in the final crop, so if there are alternate methods for having greater control over the cropping area and ensuring the correct height and width ratio (something similar to the cropping tool in eg photoshop would be ideal) I would love to know about it @garrettdashnelson

diedrick commented 1 year ago

I'd use this handy online tool: https://ncsu-libraries.github.io/iiif-crop-tool/

But with the code it creates, you should also specify an output width so it's not oversized on the website. Just replace the word 'full' with '500,' so this: https://iiif.digitalcommonwealth.org/iiif/2/commonwealth:q524n874j/1248,2574,1592,2391/full/0/default.jpg ...with this... https://iiif.digitalcommonwealth.org/iiif/2/commonwealth:q524n874j/1248,2574,1592,2391/500,/0/default.jpg

diedrick commented 1 year ago

BTW, here's what that record looks like on the live site: https://argo-staging.netlify.app/people/william-faden/