-
Notifications
You must be signed in to change notification settings - Fork 352
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
Fix: Image cdn cli improvements #6189
Conversation
const path = `/${modifiers}/${encodeURIComponent(url)}` | ||
req.url = path | ||
const sourceImagePath = url as string | ||
const modifiers = (await transformImageParams(query)) || `_` |
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.
Addition of _
handles case where no transform params are provided.
// If the image is remote, we can just pass the URL as is | ||
req.url = `/${modifiers}/${encodeURIComponent(sourceImagePath)}` | ||
} | ||
|
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.
This the only other functional change, uses the dev server to get the image instead of relying on the local dist
directory.
fit?: string | null | ||
position?: string | null | ||
} | ||
|
||
// @ts-expect-error TS(7006) FIXME: Parameter 'config' implicitly has an 'any' type. |
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.
Need images
on type before removing
netlify/build#5393
[🎉 Thanks for submitting a pull request! 🎉
Summary
Fixes ADN-72
& addresses feedback to request images from local server https://netlify.slack.com/archives/C05V2MLPAFN/p1700225547575989
Also updated types in the file I was editing which ended up being most of the changes. 😄
For us to review and ship your PR efficiently, please perform the following steps:
passes our tests.
A picture of a cute animal (not mandatory, but encouraged)