Skip to content

docs: Add guidance regarding using getImage on the client#13354

Merged
sarah11918 merged 4 commits intov6from
feat/disallow-get-image-client
Mar 6, 2026
Merged

docs: Add guidance regarding using getImage on the client#13354
sarah11918 merged 4 commits intov6from
feat/disallow-get-image-client

Conversation

@Princesseuh
Copy link
Member

Description (required)

getImage on the client does not really work / lead to sub-optimal results, so we're disabling it completely in V6

@netlify
Copy link

netlify bot commented Mar 6, 2026

Deploy Preview for astro-docs-2 ready!

Name Link
🔨 Latest commit 81f949d
🔍 Latest deploy log https://app.netlify.com/projects/astro-docs-2/deploys/69ab18bba152e7000763ca5b
😎 Deploy Preview https://deploy-preview-13354--astro-docs-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@astrobot-houston
Copy link
Contributor

astrobot-houston commented Mar 6, 2026

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

File Note
en/guides/images.mdx Source changed, localizations will be marked as outdated.
en/guides/upgrade-to/v6.mdx Localization changed, will be marked as complete.
en/reference/modules/astro-assets.mdx Source changed, localizations will be marked as outdated.
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

Copy link
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Princesseuh and others added 2 commits March 6, 2026 18:49
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
@sarah11918 sarah11918 added add new content Document something that is not in docs. May require testing, confirmation, or affect other pages. merge-on-release Don't merge this before the feature is released! (MQ=approved but WAIT for feature release!) 6.0 labels Mar 6, 2026
@sarah11918 sarah11918 added this to the v6.0.0 docs milestone Mar 6, 2026
@sarah11918 sarah11918 added the Merge Queue Approved and ready to be merged (wait for feature release if also labelled M-O-R)! label Mar 6, 2026
@sarah11918 sarah11918 merged commit dbf37e1 into v6 Mar 6, 2026
10 checks passed
@sarah11918 sarah11918 deleted the feat/disallow-get-image-client branch March 6, 2026 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.0 add new content Document something that is not in docs. May require testing, confirmation, or affect other pages. Merge Queue Approved and ready to be merged (wait for feature release if also labelled M-O-R)! merge-on-release Don't merge this before the feature is released! (MQ=approved but WAIT for feature release!)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants