Niels-IO / next-image-export-optimizer

Use Next.js advanced <Image/> component with the static export functionality. Optimizes all static images in an additional step after the Next.js static export.
MIT License
460 stars 56 forks source link

Return promise from remoteOptimizedImages.js #112

Closed PeterKottas closed 1 year ago

PeterKottas commented 1 year ago

RemoteOptimizedImages.js could optionally return a promise that resolves to an array of remote images.

TLDR: I reckon there will be people (other than me) who will fetch these from cms or some different location. Allowing the file to return a promise would allow this functionality.

@Niels-IO Do you want me to PR this or is it easier for you? I am good either way.

Niels-IO commented 1 year ago

Hi @PeterKottas,

Go ahead with the PR! Thanks

PeterKottas commented 1 year ago

Done in #113 , please double-check as I was unable to run tests. Further details in PR.