featuredImage option

Hi everyone,

I have a git repository with hugo site. I am managing it with netlify. When we deploy hugo site, it creates some default values like draft, date, etc…. and we can also add other values like tags, categories.

date
tags
categories
draft

With netlify cms site, we can add tags and categories values using the config.toml file. In hugo site, if we add “featuredImage:IMAGEURL”, in hugo post, it shows that image as the blog picture. I want to add the same featuredImage: value through cms.

I saw a value for image, but it is showing as thumbnail.
- {label: “Featured Image”, name: “thumbnail”, widget: “image”}
It is still showing as thumbnail. I have replaced it as below:
- {label: “Featured Image”, name: “featuredImage", widget: “image”}

But still it did not work. How can I add featuredImage to the values within the default values? If I add featuredImage:IMAGEURL in the post, it is showing as is, and not taking the value for featuredImage. It should go between — and — lines in the hugo default values section. How can I achieve this?

Thanks,

Can you share the full contents of config.yml, make sure you have all the changes pushed to git and that your build has no errors? Thanks

All my changes are pushed to git. None of my builds had errors. If I have to use featuredImage option, what should I use in config.yml file?

This is what I have as of now in my collection.

collections: # A list of collections the CMS should be able to edit

  • name: “post” # Used in routes, ie.: /admin/collections/:slug/edit
    label: “Post” # Used in the UI, ie.: “New Post”
    folder: “content/posts” # The path to the folder where the documents are stored
    create: true # Allow users to create new documents in this collection
    fields: # The fields each document in this collection have
    • { label: “Title”, name: “title”, widget: “string” }
    • { label: “Publish Date”, name: “date”, widget: “datetime” }
    • {label: “Featured Image”, name: “featuredImage”, widget: “image”}
    • { label: “Body”, name: “body”, widget: “markdown” }

Your config looks alright. Be aware that these changes only apply for new posts (or newly saved posts) so you might need to update older ones manually.

But that is not working. When I enable featured image in collection, it shows an option to upload image. If I do it, it is showing as thumbnail. It is not showing in the website home page. But if I add a line “featuredImage: image.jpg” in a new post, it is showing as expected.

For example, have a look at https://feelit.khusika.dev url. In the home page, there are images shown for all posts without even opening any post. If I use the collection I gave above, it just shows empty without an image. But when I open the post it shows the image.

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!

Sure, I will give them a try. Thank you. Can you get me an invite to get into netlify cms slack?

I believe it’s public and open for anyone to join.