-
Notifications
You must be signed in to change notification settings - Fork 97
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
docs: customize image component #505
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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 doesn't sanitize redirect uris & also doesn't incorporate the data uri changes into the default Image
component in the lib (which it probably should)
onError={props.onImageLoadEnd} | ||
alt="Frame image" | ||
sizes="100vw" | ||
height={0} |
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.
would add a todo implement comment with a quick example in comments of using the props to get the dimensions of the frame
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.
@stephancill think you missed this
@@ -101,3 +101,11 @@ pnpm dev | |||
### Done! 🎉 | |||
|
|||
:::: | |||
|
|||
## Using Next.js Image Optimization for image proxying |
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.
we should also include this in https://framesjs.org/guides/apps/display-frames-in-react-native
and also include a list of security properties here to check
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.
React native doesn't have a built-in image proxy - what should we suggest?
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.
would just make a comment that it's a suggestion for privacy reasons. People can always use a next.js image proxy for this and just handle it via a next.js endpoint like /proxy?img=[src]
let sanitizedSrc = props.src; | ||
|
||
// Don't allow data URLs that are not images -- we don't want to allow arbitrary data to be loaded | ||
if (props.src.startsWith("data:") && !props.src.startsWith("data:image")) { |
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.
Can we include this in the default Image implementation @stephancill ?
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.
opened a separate PR #506
Change Summary
Merge Checklist