docs: Add guidance regarding using getImage on the client#13354
docs: Add guidance regarding using getImage on the client#13354sarah11918 merged 4 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
|
sarah11918
left a comment
There was a problem hiding this comment.
Looks great, @Princesseuh ! Just some ideas for enhancement below for your consideration!
| @@ -633,6 +633,24 @@ const allBlogPosts = await getCollection("blog"); | |||
|
|
|||
| The `getImage()` function is intended for generating images destined to be used somewhere else than directly in HTML, for example in an [API Route](/en/guides/endpoints/#server-endpoints-api-routes). When you need options that the `<Picture>` and `<Image>` components do not currently support, you can use the `getImage()` function to create your own custom `<Image />` component. | |||
|
|
|||
There was a problem hiding this comment.
Out of scope for this PR, but now that we have an example for using images on the client, it would probably be nice to have a short example here, too now! Maybe in an API route!
In which case, I'd probably then add a sub-heading for the section below like ### Using generating images on the client
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
Description (required)
getImageon the client does not really work / lead to sub-optimal results, so we're disabling it completely in V6