-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drupal makes its own thumbnails, and it's confusing. #1108
Comments
That should very much be on Drupal's public filesystem. This does raise the question of if we should tie more tightly to the Drupal thumbnail system, and the answer is probably, as always, yes. It's been a while since last I looked at that and it's definitely worth re-investigating. |
I think this works for Image media types, but not files (Tiffs). So until they fix that upload form so that we can upload a Tiff as an Image we'll have to stick with this. Maybe they fixed that in 8.7. Also for things like audio/video/pdf/documents/etc.... I'm not sure how we would handle those. |
So I looked into this. If we made a custom MediaSource plugin, we can tell it to reference the thumbnails we generate for when we can't use image styles. Might be worth looking into. It goes into detail about what the responsibilities of the plugin are in the documentation: https://api.drupal.org/api/drupal/core%21modules%21media%21src%21MediaSourceInterface.php/interface/MediaSourceInterface/8.6.x |
👀 Danny that's really really cool. |
This isn't exactly a problem just a thing that caused some crossed wires, so we should probably know about. We have an Islandora 8 installation where derivatives aren't working, but Thumbnails are getting created, and I think it's Drupal's doing.
We uploaded a JPG as an original file. It's still the only "Media" attached to the Repository Item node (which is typed as an "Image"). So as far as node/34/media is concerned, we have no Service File and no Thumbnail.
But if you go look at the view of all media, /admin/content/media, the recently uploaded image is there represented by a small thumbnail. If you inspect the html, that thumbnail's src is
http://[host]/_flysystem/fedora/styles/thumbnail/fedora/2019-05/IMG_0606.JPG?itok=VCsRkku-
That actually resolves to a file.
This file lives in Fedora, as you can see by crawling Fedora (from the top-level Root Object there's a child at http://[host]:8080/fcrepo/rest/styles/thumbnail/fedora/2019-05 which contains http://[host]:8080/fcrepo/rest/styles/thumbnail/fedora/2019-05/IMG_0606.JPG
Its RDF is sparse:
I thought that these folders were the result of derivatives running. They are absolutely not. These are from Drupal's Image Styles, configured at admin/config/media/image-styles.
If I alter the View that populates /admin/content/media so the "Thumbnail" field uses the "Medium (220x220)" Image style, then my Fedora root object suddenly contains a bunch new 'medium' folders like http://[host]:8080/fcrepo/rest/styles/medium/fedora/2019-05
So, This is a way that Fedora is being used perhaps without intention. It's not explicitly harmful, but it "muddies up" the distinction that we had made wherein Drupal was the source of front-end stuff, and Fedora was for preservation.
The text was updated successfully, but these errors were encountered: