Replies: 6 comments 2 replies
-
We can’t let people disable it as it would allow you to get 3 types of attack vectors: We can consider wildcard support though 👍 |
Beta Was this translation helpful? Give feedback.
-
Consider this case:
So I'd like to propose the following: either: fallback to the basic HTML module.exports = {
images: {
domains: ['domain1.com', 'domain2.com'],
fallback: true,
},
} OR: allow users to explicitly opt-in to allowing all domains by setting something like module.exports = {
images: {
domains: [],
dangerouslyAllowAllDomains: true,
},
} but this doesn't seem to be the the plan. |
Beta Was this translation helpful? Give feedback.
-
Both sound great. It’d be really great to have frontend/CSS consistency regardless of the image host, so the |
Beta Was this translation helpful? Give feedback.
-
yep, facing same problem since we are using S3 which has variant of domains , wildcards would be awesome idea |
Beta Was this translation helpful? Give feedback.
This comment was marked as spam.
This comment was marked as spam.
-
I highly support this decision. Instagram blocks me from CORS so I can't display any posts directly from my webpage. Next's image component WOULD solve it, but I can’t possibly enable all their cdn domains that change every now and again. |
Beta Was this translation helpful? Give feedback.
-
On https://workshops.hackclub.com, to prevent ballooning the already-multiple-GBs source repo, we have folks upload images/media to the Vercel CDN as individual deployments (using some internal tooling) so the dev experience is faster. However, this means each image is at a different hostname. I’d love to switch our homepage there to use Next.js Image Optimization, but since each image is on a different/unknown domain, we can’t. Two solutions jump out to me:
domains
restriction entirely (opening your site up to being used as an external service)cloud-*.vercel.app
would work fine)—a little more technically/usage complex but is definitely saferBeta Was this translation helpful? Give feedback.
All reactions