cyrilwanner / next-optimized-images

🌅 next-optimized-images automatically optimizes images used in next.js projects (jpeg, png, svg, webp and gif).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

External Image from API

ekoydakoykoy opened this issue · comments

I wanted to use this library but I cant make it work using external url (images) coming from an API.

From #74, it seems like this isn't possible ☹️ :

This is not possible, unfortunately. Since this is only a webpack loader, it can only handle local files (you can also not import remote js files with webpack). If you are in charge of the API, you can optimize the images in the API (e.g. on upload). If you are using a 3rd party API and they haven't optimized their images, you could also use an image optimization proxy in front of their images.