You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can specify a fallback service for local or non-CDN images, which can be any supported CDN or sharp or squoosh (which uses the local Astro image endpoint). By default it will try to detect if a service is available on the hosting platform, which for now means Netlify or Vercel, and otherwise it will use sharp.
Currently the layout is always "constrained", and neither densities or widths are supported because it uses the standard Unpic constrained breakpoints.
Currently support in Markdown is rather limited, because image services are only used for local images and so it can't transform remote URLs. There's also no way of setting the size or other props, so you're generally better off using MDX if possible, but this has the benefit of being a drop-in addition that magically makes your images better.
I would still recommend using the @unpic/astro component when possible, for most flexibility, as you can set layout and other options.
1 paths audited Performance: 96 (no change from production) Accessibility: 100 (no change from production) Best Practices: 100 (no change from production) SEO: 92 (no change from production) PWA: - View the detailed breakdown and full score reports
1 paths audited Performance: 97 (no change from production) Accessibility: 100 (no change from production) Best Practices: 100 (no change from production) SEO: 92 (no change from production) PWA: - View the detailed breakdown and full score reports
1 paths audited Performance: 100 (no change from production) Accessibility: 100 (no change from production) Best Practices: 100 (no change from production) SEO: 100 (no change from production) PWA: - View the detailed breakdown and full score reports
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an experimental Astro Image Service. This is enabled by adding it like this:
You can then use the normal Astro image component and all images will use Unpic, with automatically optimised image CDN URLs and responsive layout.
You can specify a fallback service for local or non-CDN images, which can be any supported CDN or sharp or squoosh (which uses the local Astro image endpoint). By default it will try to detect if a service is available on the hosting platform, which for now means Netlify or Vercel, and otherwise it will use sharp.
Currently the layout is always
"constrained", and neitherdensitiesorwidthsare supported because it uses the standard Unpic constrained breakpoints.Currently support in Markdown is rather limited, because image services are only used for local images and so it can't transform remote URLs. There's also no way of setting the size or other props, so you're generally better off using MDX if possible, but this has the benefit of being a drop-in addition that magically makes your images better.
I would still recommend using the
@unpic/astrocomponent when possible, for most flexibility, as you can set layout and other options.