Open rosiel opened 5 months ago
When testing this you'll need a fresh install. Anonymous viewers can already see the thumbnail images if anyone with fedoraAdmin in their roles has been there first.
There looks like there's a need for potentially a separate stream wrapper for image derivatives in Drupal core.
Apparently S3FS does a lot of acrobatics to avoid this issue by having PHP generate the image until it gets into the remote file system and then it is served from there.
Related Drupal.org issue:
https://www.drupal.org/project/drupal/issues/3354207#content
There's well-founded concerns about potential bandwidth waste if the same image is triggered to be generated on multiple edge servers.
The above issue has good discussion on the problem, but was closed as a duplicate of:
https://www.drupal.org/project/drupal/issues/2670404
This is an actively-developed feature currently against Drupal 11.x branch to add public-cache:// and private-cache:// stream wrappers for derivative files.
Though the PR was merged, there are enough good ideas in here for better solving the problem that I propose leaving this ticket open as a potential improvement.
Drupal's built-in image styles are very useful for on-demand resizing images to the size you want them to display on the page. However, when we store images in Fedora, then Drupal tries to make its image style "derivatives" in Fedora. If the user viewing the page is
anonymous
then Drupal can't create its resized images and no images show up.The simplest solution so far has been to display images at original size. For the Islandora Demo Objects, this means resizing the collection thumbnails down to a reasonable display size.
A better solution was proposed by @adam-vessey on Slack (more than once):
https://islandora.slack.com/archives/CM5PPAV28/p1707233262017769?thread_ts=1707232512.928749&cid=CM5PPAV28
He further elaborated...
What steps does it take to reproduce the issue?