gbif / hp-beaty-biodiversity-museum

This repository is for the GBIF Hosted Portal for the Beaty Biodiversity Museum
https://collections.beatymuseum.ubc.ca
Apache License 2.0
1 stars 3 forks source link

Image previews not consistently loading #47

Closed mpitblado closed 7 months ago

mpitblado commented 10 months ago

On the fungi dataset page, the thumbnails of images do not appear, with the grey placeholder boxes being shown instead.

image

However, when clicking to view all images, the images display according to expectations.

image

In the slideover card, the images again do not load as expected.

image

The one observation I have at this time is that the images are being requested over http, and the server is setup with HSTS. For instance, if I try to access the image through the url in edge instead of firefox, I am presented with a 403 error. I have to manually add the s to http to make the connection possible.

image

As I am working on setting up a new image server, I am curious if you know if this https theory is actually the cause, or if there is something else I should keep in mind in the new setup to fix this bug.

mpitblado commented 10 months ago

Within the Lichen dataset, images are loading properly in all locations, which puzzles me because they are being called from the same resource.

image

MortenHofft commented 10 months ago

I fairly certain the answer is: it works in some cases because some of the the scaled images are cached from a previous working version. The current data points to not functional urls.

It makes it slightly more obscure/confusing because the images are loaded and cached in different ways in different places. But if the initial identifiers worked, then I'm quite certain the site would as well.

But it is a good reminder for me that I should run all images through the cache.

mpitblado commented 10 months ago

Understood, so basically the only reason why any images are currently working at all is because there was a previous cache to rely on. New image paths are in the works that should fix this, and will leave issue open until then to show that I am aware of the grey boxes.

mpitblado commented 8 months ago

@MortenHofft I have tested record https://collections.beatymuseum.ubc.ca/specimen/search?catalogNumber=V1, replacing the associatedMedia to a different source. Image appears to be loading as intended across staging, production, and gbif.org, and confirmed that it is not the cached version of the image by adding a small red dot to the testing image. I will begin rolling out the new image sources to a limited set of records (possibly around 1000) to monitor bandwidth, and then scale up from there if everything looks good.

mpitblado commented 7 months ago

Images now running at full scale. Closing as complete