-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MDX] Support img
component prop for optimized images
#8468
Conversation
🦋 Changeset detectedLatest commit: 783e31f The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
I'm debating if this is a major, since it will now pass ImageMetadata for optimized images (see changeset). Could be breaking, or just a "new feature" since we didn't respect the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
major
is probably safer given that users may need to update their existing code, but if users couldn't actually use img
previously, I think minor
makes sense.
Code LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You went much further than I would've had I implemented this myself, awesome work!
Changes
Respect the
img
component prop / export for images optimized viaastro:assets
. This will pass anImageMetadata
object as thesrc
property to anyimg
component when an optimized image is used.img
MDX component override is not used in Astro collections #7223'astro-image'
custom element to map via thecomponents
propTesting
components
property as export, esm import, and content collection entryDocs