feat(v6): update cloudflare default image service#13267
feat(v6): update cloudflare default image service#13267Princesseuh wants to merge 6 commits intov6from
Conversation
✅ Deploy Preview for astro-docs-2 ready!
To edit notification comments on pull requests, go to your Netlify project 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
|
|
Just noting that this will need an entry in the Cloudflare upgrade guide here too, where the change is clearly noted and with any upgrade guidance! https://v6.docs.astro.build/en/guides/integrations-guide/cloudflare/#upgrading-to-v13-and-astro-6 Normally when a default setting has changed, we say things like "inspect your deployed project for anything funky" in case this affects them. And if possible, we like to give advice on what to do to "revert to the previous behavior" (since presumably that was already working), which in this case seems to be explicitly setting Edited to add: Will note that this won't go in the main v6 upgrade guide since it's just for Cloudflare, but you can see what other "Changed default" entries typically look like there for inspiration! https://v6.docs.astro.build/en/guides/upgrade-to/v6/#changed-defaults |
| - **`cloudflare-binding`:** Uses the [Cloudflare Images binding](https://developers.cloudflare.com/images/transform-images/bindings/) for image transformation. The binding is automatically provisioned when you deploy. | ||
| - **`passthrough`:** Uses the existing [`noop`](/en/guides/images/#configure-no-op-passthrough-service) service. | ||
| - **`compile`:** Uses Astro's default service (Sharp), but only on pre-rendered routes at build time. For pages rendered on demand, all `astro:assets` features are disabled. | ||
| - **`compile`:** Transforms images at build time for pre-rendered routes. Uses passthrough for on-demand rendered pages. |
There was a problem hiding this comment.
This should still say what it uses, like all the other options, since this option is to define which image service is being used.
And, is the previous sentence now incorrect, that all astro:assets features are disabled for pages rendered on demand? That seemed a very clear way of stating it, so if it hasn't changed, I'm wondering why the wording has? Or do you want to emphasize the passthrough runtime behaviour? If so, then I'd write passthrough in code, something like:
| - **`compile`:** Transforms images at build time for pre-rendered routes. Uses passthrough for on-demand rendered pages. | |
| - **`compile`:** Uses XXXXXXX to transform images at build time for prerendered routes. The noop `passthrough` option is configured for on-demand rendered pages. |
(Also, note that we're standardizing docs around prerendered (no hyphen) as we get around to them, so might as well update that here!)
There was a problem hiding this comment.
The reason it just says locally instead of explaining exactly what it uses to transform is because its using sharp but through miniflare so its not exactly the same as it was before when we just said it uses sharp
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
Description (required)
withastro/astro#15435 changes the default to use the bindings instead of compile because compile's dev behavior is not intuitive anymore (yet)