Next.js Discord

Discord Forum

How to save the images fetched from the headless CMS for an SSG website?

Brown bear posted this in #help-forum
Open in Discord
Brown bearOP
Hello! I have a static website that takes it's data from a headless CMS at build time and builds its pages with it using getStaticProps.
However, for the images, they are not saved in the bundle, instead they are queried from the CMS host every time.
Is there any way to make the images be saved in the exported project when building the project, and to reference them by their path in the 'public' folder or something similar?

1 Reply

Brown bearOP
I won't have many updates in the CMS so there is no problem if the projects needs to be rebuilt when adding new images.