Hello all, my apologies if this has been covered here before; I searched and didn’t find anything.
Using HUGO’s internal OpenGraph card templates with the Netlify-CMS Image Widget, I get an error when uploading a picture to the “images” field in a posts frontmatter area.
As it stands now, when selecting or uploading an image, the path is inserted as /path/to/image.file, which gives me this error in my HUGO terminal:
error calling partial: execute of template failed: template: _internal/opengraph.html:5:43: executing "_internal/opengraph.html" at <.>: range can't iterate over /img/g
However, changing the “images” path to [“path/to/image.file”] seems to do the trick and fixes any errors.
How can I tell Netlify-CMS to format my image path as such? I’ve tried setting a default value that uses the correct syntax ( [“path”] ) but it doesn’t stick when selecting a new image through the widget.
Any thoughts would be much appreciated! Thank you!
I think there’s a better way for me to phrase this question: is it possible to define the syntax for how the path to my image is inserted into the frontmatter?
Hi there! Thanks for your interest in Netlify CMS. Looks like you posted your question a little while ago, but that you haven’t received a solution yet. Here’s where you might get more help:
netlifycms.org - the site houses our extensive documentation that likely contains helpful information to get you back on track.
netlify cms slack - join our friendly slack channel and chat with other cms pros to get the help you need.
GitHub Issues - think you’ve found a bug, or would like to make a feature request? Make your voice heard here. Netlify CMS is open source - PRs and other contributions are also welcome!
Stack Overflow Check StackOverflow for questions tagged “Netlify CMS” if you don’t get an answer in the Slack or the GH issues. StackOverflow reaches a worldwide audience of knowledgeable people.
Your question will be left open here for anyone to comment - but we encourage you to check out the above resources if you are still looking for a solution!