Skip to content

Help with React-Router-7 and Vercel setup #786

Closed Answered by ascorbic
nikolailehbrink asked this question in Q&A
Discussion options

You must be logged in to vote

Ah, yes the problem is that unlike Netlify, Vercel hard-codes the allowed widths for images, and if you request a different size then it gives an error. It makes things hard for libraries like Unpic. There are a few ways to work around this, none of them ideal. One is to manually set allowed widths in your vercel.json, but that does mean you need to know what the sizes are. The other is to use the breakpoints prop to pass in the list of allowed widths, but that does mean you lose the benefit of automatic sizing.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@nikolailehbrink
Comment options

@ascorbic
Comment options

@artt
Comment options

Answer selected by nikolailehbrink
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants