-
Notifications
You must be signed in to change notification settings - Fork 394
Open
Description
This is what I got when try to load Instagram image

/pages/api/image-proxy.js
import { withImageProxy } from '@blazity/next-image-proxy'
export default withImageProxy({
whitelistedPatterns: [/^https?:\/\/(.*).cdninstagram.com/]
})
/pages/index.js
const url = 'https://scontent-lax3-2.cdninstagram.com/v/t51.2885-15/317193037_1200508460548428_7875630962554406174_n.jpg?stp=dst-jpg_e35_p1080x1080&_nc_ht=scontent-lax3-2.cdninstagram.com&_nc_cat=100&_nc_ohc=EfCsI3Ie_UYAX_7GUFR&edm=APU89FABAAAA&ccb=7-5&oh=00_AfDX_6YrEWOEUpkP24VqWOnJSUG1qAomz_uv1PXrAiZvIQ&oe=63C4DD80&_nc_sid=86f79a'
<Image
className="object-cover"
key={key}
src={`/api/image-proxy?imageUrl=${url}`}
alt={item.caption}
width={500}
height={500}
/>
Metadata
Metadata
Assignees
Labels
No labels