withastro / adapters

Home for Astro's core maintained adapters
64 stars 33 forks source link

feat(netlify): add support for image.remotePatterns and images.domains with Netlify Image CDN #187

Closed ascorbic closed 6 months ago

ascorbic commented 6 months ago

Changes

Previously the Netlify adapter was not able to enable support for remote images. This PR adds support for image.remotePatterns and images.domains config options. If a user sets these then the adapter converts them into regexes and writes them to Netlify's images.remote_images config option.

Testing

Added a test image to the fixture site. Added tests for generating the patterns and the config file.

Docs

Docs PR: https://github.com/withastro/docs/pull/7375

changeset-bot[bot] commented 6 months ago

🦋 Changeset detected

Latest commit: 590a6d4bbca522a8941fde1777b3fca7100c1eaf

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages | Name | Type | | ---------------------------------- | ----- | | @astrojs/netlify | Minor | | @test/netlify-hosted-astro-project | Patch |

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

alexanderniebuhr commented 6 months ago

@ascorbic thanks for the PR, we'll get it reviewed asap.. Once you have the docs PR, please crosslink both PRs :)

ascorbic commented 6 months ago

Thanks! Docs are now ready

ascorbic commented 6 months ago

Is there anything else that needs doing before this can go in?

ascorbic commented 6 months ago

Thanks, @ematipico. What's the timeline for these releases to go out?

alexanderniebuhr commented 6 months ago

@ascorbic I just released it! Docs will be merged once reviewed.

ascorbic commented 6 months ago

That's great! Thanks