I'm using WordPress as a headless CMS for my website and I wish to generate a static website from my Next.js project. What I want to achieve is to be able to also copy the images and data from the wp-content folder to my next.js out folder, changing the urls (http://mywpsite.com/wp-content/uploads/2020/10/1.jpg etc.) in the built html files to /public/wp-content/uploads/2020/10/1.jpg.
Basically I'd want to export my Next project in a way that I'm also hosting the files that I have the project connected with. I also don't want to host my image assets from my headless CMS, but just from the outputed folder.
My stoneage man idea would be to download that folder manually and doing a find/replace on those files. Not knowing if this works, but I'm curious if someone else have thought about the same problem that I'm currenly in and has come up with a solution or knows in what direction I should go with this?