'Next images export folder

In next.config.js I config image optimization like this in order to download all related images when I run command next export

module.exports = {
  images: {
    loader: "imgix",
    path: "example.com",
    domain: "example.com",
  }
}

Then when next exported to folder out, all the images are in the root of out folder, like this

├── 404
│   └── index.html
├── _next
│   └── data
...
├── ExampleImage1.svg
├── ExampleImage2.svg

How can I collect all the images to an folder images, like this:

├── 404
│   └── index.html
├── _next
│   └── data
...
├── images
│   └── ExampleImage1.svg
│   └── ExampleImage2.svg

Many thanks!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source