You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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):
… could look at reworking image styles to explicitly write to other schemes (as in, to write the derived image style images under a different scheme instead of the same). I could look at pulling this out into something more redistributable if there’s interest there. Alternatively, if the Fedora adapter indeed identified itself as not being writable, it appears that it would happen automatically? [emphasis added]
When does this issue occur?
Viewing the front page of the sandbox, or any other page where anonymous views an image appears that is resized from its original size, where the image lives in Fedora.
The text was updated successfully, but these errors were encountered:
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.
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?
Viewing the front page of the sandbox, or any other page where anonymous views an image appears that is resized from its original size, where the image lives in Fedora.
The text was updated successfully, but these errors were encountered: