I just enabled the Visual Editor on my site, and I’m having an issue with images uploaded for a page using an image
field. I’m using Hugo as my ssg.
I’m using the GitContentSource
and my config successfully lets me make new pages and upload images to the expected repo location on the preview
branch. The uploaded image also previews correctly in the visual editor.
However, when I publish the page, only the page’s markdown file gets merged into the main
branch. This ultimately leads to a file not found issue when the deploy completes.
My assets configuration looks like this:
assetsConfig: {
referenceType: "static",
staticDir: "static",
uploadDir: "images/uploads",
publicPath: "/"
}
I expect that:
- images get uploaded to
static/images/uploads/
- the public path on deploy resolves to
/images/uploads/
All of this happens as expected in the preview
branch. If I manually merge the image from preview
into main
, the deployed site works as expected.
My site is https://swayzee-edc.netlify.app, but the repo for it is currently private.