-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
feat: allow adding remote file allowed url patterns #38719
Merged
Merged
Conversation
This file contains 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
gatsbot
bot
added
the
status: triage needed
Issue or pull request that need to be triaged and assigned to a reviewer
label
Nov 30, 2023
pieh
commented
Nov 30, 2023
pieh
commented
Nov 30, 2023
packages/gatsby-source-wordpress/src/steps/add-image-cdn-allowed-url.ts
Outdated
Show resolved
Hide resolved
pieh
added
topic: media
Related to gatsby-plugin-image, or general image/media processing topics
and removed
status: triage needed
Issue or pull request that need to be triaged and assigned to a reviewer
labels
Dec 1, 2023
…cause package requires at least that version we remove it
pieh
changed the title
feat: allow adding image cdn allowed url patterns
feat: allow adding remote file allowed url patterns
Dec 6, 2023
pieh
added a commit
that referenced
this pull request
Dec 15, 2023
* alternate image url construction * try using image cdn in e2e site * Update netlify.toml * have separate check for dispatching image and file service * fix tests? * try to use images from deploy (so we can avoid using ones hosted externally) * replicate prod-runtime imagecdn tests in adapters * fix import * adjusting remote-file tests * adjusting remote-file tests 2 * cleanup/test * assert naturalWidth/height in image-cdn tests (both adapters and production-runtime) * remove unused * don't use path prefix for alternate image cdn url * _gatsby/file is prefixed * feat: move custom image cdn url generator implementation to adapter (#38715) * feat: move custom image cdn url generator implementation to adapter * provide public types for custom image cdn url generator function signature and individual arguments * use position/cover * update comment * update docs * chore: types/jsdocs shuffle * apply suggestion from https://github.com/gatsbyjs/gatsby/pull/38685\#discussion_r1414135797 * remove docs from feature branch * feat: provide custom FILE_CDN url generator from adapter (#38735) * feat: provide file cdn from adapters * update test * fix tests * use edge function for non-image File CDN * why edge function was not deployed? * bump netlify-cli * ? * bump node for adapters tests * add execa to dev deps * cleanup * some jsdocs updates * add note that generated urls ideally are relative, but can be absolute as well * feat: allow adding remote file allowed url patterns (#38719) * feat: move custom image cdn url generator implementation to adapter * provide public types for custom image cdn url generator function signature and individual arguments * feat: allow adding image cdn allowed url patterns * Module.createRequireFromPath doesn't exist anymore in Node 18, and because package requires at least that version we remove it * fix contentful source image url * fix wordpress source image url * rename ImageCdnAllowed to RemoteFileAllowed as it's not just for image cdn * compare allowed remote urls in netlify.toml with ones generated by gatsby * url testing in filecdn * jsdocs * print warnings for netlify.toml about missing remote_images patterns * test if any existing pattern in netlify.toml allow needed remote url instead of just string comparison * chore: update adapter README about imageCDN * use correct remote_images for adapters e2e site --------- Co-authored-by: Michal Piechowiak <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This builds on top of #38685 (tho not directly related and can be handled separately, but it is part of same problem space).
It adds a way for users and source plugins to define allowed external urls that are used for image source for Image CDN transformations and pass that information down to adapter to be able to configure platform specific image cdn (in case a platform need that information)
Documentation
Tests
Related Issues