-
Notifications
You must be signed in to change notification settings - Fork 2
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: use dynamic images as image size too large #619
Conversation
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.
Note this is a test branch to verify the solution. The optimized URLs will be returned from the API with no update needed to this project. Blocking to avoid accidental merge.
Currently, the images do not load with this change: https://react-ka4irjlds.seam.vc/examples/basic/
vercel.json
Outdated
@@ -84,7 +84,7 @@ | |||
"headers": [ | |||
{ | |||
"key": "Content-Security-Policy", | |||
"value": "default-src 'self'; connect-src 'self' https://connect.getseam.com; img-src 'self' https://connect.getseam.com; font-src 'self' https://fonts.gstatic.com; style-src 'self' https://fonts.googleapis.com" | |||
"value": "default-src 'self'; connect-src 'self' https://connect.getseam.com; img-src 'self' https://connect.getseam.com https://console.seam.co; font-src 'self' https://fonts.gstatic.com; style-src 'self' https://fonts.googleapis.com" |
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 is going to be an issue. If we suddenly change image hosts we will break consumers using CSP.
closing as handled via https://github.com/seamapi/seam-connect/pull/6866 |
closes #616
This is a POC. We'll use Next.js'
_next/image
directly to get a dynamic image size.Before
After
webp
as expectedLive storybook
https://react.seam.co/?path=/docs/components-devicetable--docs
I replaced the
src
attribute, and it's quite a big difference.