twopluszero / next-images

Import images in Next.js (supports jpg, jpeg, svg, png and gif images)
MIT License
949 stars 67 forks source link

Add support for assetPrefix option #2

Closed techninja closed 6 years ago

techninja commented 6 years ago

Next.js has an assetPrefix for CDNs and though you can set it for its own assets, it has no effect on webpack. Just a quick suggestion here to allow for optionally passing this as an option in case projects need to set their own CDN or absolute domain location on render.

arefaslani commented 6 years ago

That looks good. Could you please improve the readme on how to use CDN assets?