{"repo":"Blazity/next-image-proxy","free":true,"listed":false,"github":"https://github.com/Blazity/next-image-proxy","clone":"git clone https://github.com/Blazity/next-image-proxy.git","description":"🖼️ Image proxy for Next.js. Makes it possible to use dynamic domains in next/image component.","language":"TypeScript","stars":79,"topics":["nextjs","next","react","image-proxy","image-optimization","nextjs-plugin","nextjs-serverless"],"license":null,"category":"networking-infra","readme_excerpt":":warning: Next has this feature built-in : If you're using Next.js 12.3 or higher, you don't have to use this library Next.js Image Proxy Image proxy for Next.js. Makes it possible to use dynamic domains in next/image component. ❔ Motivation This library makes it possible to use next/image with dynamic domains. If you work with external providers, like Facebook, Instagram, Etsy, Medium, and others, the images often have dynamic subdomains. For example, you might get the first image from scontent-akl1-1.cdninstagram.com and the second one from scontent-akl3-1.cdninstagram.com . Although adding them one by one to the config could work temporarily, it would not be reliable since they can change at any time. The whole issue could be resolved by adding a regex pattern to next.config.js , but unfortunately, Next.js doesn't support that. If you want to follow the discussion about Next.js supporting it outside of the box, please refer to this Discussion and this Pull Request You have to remember that there're some cons: - You can create a security loophole if your regex isn't strict enough - Since it is a proxy, it will increase bandwidth costs. But the increase will be marginal unless you're working on big scale project (i.e. mils of requests per month) Limitations: - Might not work on Netlify - Might not work with serverless-next.js 🧰 Installation 💻 Use It is really simple to setup, you just need to add a new API route that exports one function. The name of the endpoint is up to ","default_branch":null,"files":null,"tree":[],"storefront":"/r/Blazity","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Blazity/next-image-proxy/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}