-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat: Add remote image caching behaviour docs #10377
feat: Add remote image caching behaviour docs #10377
Conversation
✅ Deploy Preview for astro-docs-2 ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
Hello! Thank you for opening your first PR to Astro’s Docs! 🎉 Here’s what will happen next:
|
Thank you for submitting this extra content! I will ask @Princesseuh and/or @ascorbic to verify the technical content is what they'd like to appear in documentation. Once confirmed that this is the information they're comfortable documenting, then I'll edit for docs! This might mean moving the content to a different section, as this at first glance seems more suited to the section on remote authorization, and not in "where you can store your images." But first, just want to make sure this is the technical information we intend to document! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks technically correct (which is the best kind of correct)
For extra protection when dealing with external sources, Astro's image components and helper function will only process (e.g. optimize, transform) images from [authorized image sources specified in your configuration](#authorizing-remote-images). Remote images from other sources will be displayed with no processing. | ||
For extra protection when dealing with external sources, Astro's image components and helper function will only process (e.g. optimize, transform) images from [authorized image sources specified in your configuration](#authorizing-remote-images). Remote images from other sources will be displayed with no processing. | ||
|
||
#### Asset Caching |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be interesting to note that local images are also cached.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Princesseuh Do you think maybe an entire section on Image Caching would make sense? (not strictly contained in a section about remote images?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say so! But it might be confusing for some users, since it's a bit more advanced than the rest and it's not something you interact with directly
It might be interesting to mention where the images are cached, sometimes users want to know what to need to keep between builds for caching (here you can link to |
I've moved the new documentation to its own section "Asset Caching", and mentioned how local images are also cached. I added a mention of I also expanded on revalidation, explaining that the remote server requires support for the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fantastic, @oliverlynch ! I really appreciate the great docs here, and the going above and beyond to document more than just your feature! 💜
Had some small suggestions for your consideration, and can't wait to get this in with the next minor release! 🥳
Co-authored-by: Sarah Rainsberger <[email protected]>
Thanks @sarah11918 for the suggestions, I've committed them as-is. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic @oliverlynch ! Welcome to Team Docs! 🥳
Description (required)
Currently the behaviour of Astro's remote image cache is undocumented, which makes discovering the feature difficult and its behaviour unclear. This change adds an explanation of the asset cache, as well as some technical details on how it functions, which should be helpful for anyone configuring a remote image server for Astro.
Part of this change references the revalidation feature introduced in Astro PR #12426, however the rest documents existing functionality.
Related issues & labels (optional)
For Astro version:
5.1
. See astro PR #12426.Not yet merged - milestone.