Serving images from a Next.js public folder without interfering with the BigCommerce remotePattern #705
-
Hello! This is doing my head in a little bit. I generally understand how the repo is pulling in all image assets from BigCommerce, however, for something like my logo, I would like to be able to define it in a /public directory and use the basic Next/Image component to display it. How might I accomplish this? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
It was resolved by including the images path in the middleware. Does this create any adverse effects?
|
Beta Was this translation helpful? Give feedback.
-
@seanlundberg there's an example here: https://github.com/bigcommerce/catalyst/blob/main/apps/core/components/hero/index.tsx#L21-L28 You should be able to just use You can also add multiple remotePatterns if you like, to use multiple image sources. |
Beta Was this translation helpful? Give feedback.
@seanlundberg there's an example here:
https://github.com/bigcommerce/catalyst/blob/main/apps/core/components/hero/index.tsx#L21-L28
You should be able to just use
<Image />
normally in this way.You can also add multiple remotePatterns if you like, to use multiple image sources.