Update Cloudflare imageService docs for custom image service support#14095
Update Cloudflare imageService docs for custom image service support#14095adamchal wants to merge 1 commit into
imageService docs for custom image service support#14095Conversation
Clarify that `compile` mode uses a configured custom `image.service` when defined (running its `getURL()`/`getHTMLAttributes()` hooks during prerendering), and that `custom` mode now also generates optimized assets at build time via the service's `transform()` hook, without bundling Sharp when it is not needed. See withastro/astro#17099.
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:
|
|
Preview deployment ✅ Deployment complete!
|
Clarify that
compilemode uses a configured customimage.servicewhen defined (running itsgetURL()/getHTMLAttributes()hooks during prerendering), and thatcustommode now also generates optimized assets at build time via the service'stransform()hook, without bundling Sharp when it is not needed.See withastro/astro#17099.
Description (required)
Two mode descriptions were out of date:
compilepreviously always used the adapter's internal workerd image service. It now uses the configuredimage.serviceif one is defined (running its customgetURL()andgetHTMLAttributes()hooks while prerendering), and falls back to the internal dependencies only when no custom service is set.custompreviously ran only at runtime. It now also generates optimized image assets at build time for prerendered routes (the service'stransform()hook runs at build), and Sharp is no longer bundled into the worker when the configured service does not need it.The edits keep the existing bullet structure, reuse the existing Image Options link, and preserve the existing
workerdruntime caveat oncustom.Related issues & labels (optional)
compile+custom) astro#17099improve or update documentationDiscord username: adam.chal