Skip to content

feat(reference): Update astro:assets reference for new Astro 6.0 behavior#12639

Merged
florian-lefebvre merged 8 commits into
v6from
feat/cropping
Nov 7, 2025
Merged

feat(reference): Update astro:assets reference for new Astro 6.0 behavior#12639
florian-lefebvre merged 8 commits into
v6from
feat/cropping

Conversation

@Princesseuh

Copy link
Copy Markdown
Member

Description (required)

In Astro 6, you can crop images and set fit and position without needing a layout. I'll admit, I don't fully understand how layouts work since I wasn't around when it was added, but hopefully I got it.

Related issues & labels (optional)

withastro/astro#14629

@netlify

netlify Bot commented Oct 29, 2025

Copy link
Copy Markdown

Deploy Preview for astro-docs-2 ready!

Name Link
🔨 Latest commit 1cb765d
🔍 Latest deploy log https://app.netlify.com/projects/astro-docs-2/deploys/690e034cac8b75000875b82d
😎 Deploy Preview https://deploy-preview-12639--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

astrobot-houston commented Oct 29, 2025

Copy link
Copy Markdown
Contributor

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 Source changed, localizations will be marked as outdated.
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.

@florian-lefebvre

florian-lefebvre commented Oct 29, 2025

Copy link
Copy Markdown
Member

You need to update the upgrade guide as well, see #12322

@sarah11918

Copy link
Copy Markdown
Member

So based on this, if fit and position no longer require layout, then that "Responsive Images Properties" section probably isn't needed anymore, and layout itself could just be thrown up higher into the full list of image properties too, eh?

Like, this isn't true anymore:

Setting the layout property on an <Image /> or <Picture /> component creates a responsive image and enables additional property settings.

That was the reason to have the section, so I'd suggest we just move the layout API reference up too, and remove that section.

@Princesseuh

Copy link
Copy Markdown
Member Author

I removed the section entirely. I'll try to think of something to put in the upgrade guide

@sarah11918

Copy link
Copy Markdown
Member

It's not going to let me suggest fixes for the links that are broken now that there is no more section called "Responsive Images."

In general, use the following ideas to fix these:

  • occurrences of "responsive images" are just plain text, no link. They are a thing that exists, but they are (no longer) an Astro thing. So we use the phrase as regular terminology, but we don't document what they are.
  • "responsive image properties" no longer exist. They are not a thing. They should not even be mentioned.

In most cases, just removing the link should be fine. In a case where e.g. it says "image properties AND responsive image properties", it's now just "image properties."

As for the images.mdx guide page that now has a broken link, I would remove the link and update the text there to be something like:

With responsive image properties (layout, fit, position) applied to the <Image /> or <Picture /> components, ...

For the guide page, it's fine to be a little bit more explainy. These are generally known as properties you use when making images responsive.

If you have any doubt, when you update these, they will at least become changes I can make suggestions on top of!

@sarah11918 sarah11918 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just one small comment, and cleaning up all the now-broken anchor links, and this looks great!

Comment thread src/content/docs/en/reference/modules/astro-assets.mdx Outdated
Comment thread src/content/docs/en/guides/upgrade-to/v6.mdx Outdated
Comment thread src/content/docs/en/guides/upgrade-to/v6.mdx Outdated
Comment thread src/content/docs/en/guides/upgrade-to/v6.mdx Outdated
Comment thread src/content/docs/en/guides/upgrade-to/v6.mdx Outdated
Comment thread src/content/docs/en/guides/upgrade-to/v6.mdx Outdated
Comment thread src/content/docs/en/guides/upgrade-to/v6.mdx Outdated
Comment thread src/content/docs/en/guides/upgrade-to/v6.mdx Outdated
Comment thread src/content/docs/en/guides/upgrade-to/v6.mdx Outdated
Comment thread src/content/docs/en/guides/upgrade-to/v6.mdx
Co-authored-by: Armand Philippot <[email protected]>

@ArmandPhilippot ArmandPhilippot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I left a nit regarding the table of contents, otherwise the contents looks great to me!

Comment thread src/content/docs/en/reference/modules/astro-assets.mdx
Comment thread src/content/docs/en/reference/modules/astro-assets.mdx Outdated
Comment thread src/content/docs/en/reference/modules/astro-assets.mdx Outdated

@sarah11918 sarah11918 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

@florian-lefebvre
florian-lefebvre merged commit 7bee4c3 into v6 Nov 7, 2025
10 checks passed
@florian-lefebvre
florian-lefebvre deleted the feat/cropping branch November 7, 2025 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants