loculus-project / loculus

An open-source software package to power microbial genomic databases
https://loculus.org
GNU Affero General Public License v3.0
37 stars 2 forks source link

Host all images in a way that lets them be cached #2500

Open theosanderson opened 2 months ago

theosanderson commented 2 months ago
          On thing: when I refresh the page, the self hosted images all blank out and reload - whereas the externally linked ones don't. I prefer the old way it loaded.

Originally posted by @corneliusroemer in https://github.com/loculus-project/loculus/issues/2486#issuecomment-2303141971

Cornelius noted that all of our images loaded on Astro in some sense reload every page refresh. I haven't been able to find how we can configure this within our Astro, but we can just host all images using something like S3 and they will have a sensible or configurable cache policy.

corneliusroemer commented 2 months ago

Have you looked at this? We could use local images, they get auto-optimized: https://docs.astro.build/en/guides/images/

theosanderson commented 2 months ago

I think the main use case for Loculus is without any custom build step, so don't personally see that as the way to go