3

I'm trying to get my url img in my axios response from fetching my posts content-type from strapi api. Here what I've done: I create my posts content-type and I create a components which contains fews media's slot:

enter image description here

Then I call the end point http://localhost:1337/api/posts?populate=* but I can't get any data from this components:

enter image description here

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Nathan
  • 41
  • 3
  • Does this answer your question? [Components not included in Strapi api response](https://stackoverflow.com/questions/70249364/components-not-included-in-strapi-api-response) – IceJonas Jan 05 '22 at 16:49
  • same isue, i find my solution there: https://stackoverflow.com/questions/70249364/components-not-included-in-strapi-api-response – zuck May 07 '22 at 22:46

2 Answers2

4

You will have to deeper into it. Call your endpoint like this:

http://localhost:1337/api/posts?populate[ImgWidget][populate]=*
buddemat
  • 4,552
  • 14
  • 29
  • 49
-1

try this one, i try it and it works for me:

http://localhost:1337/api/posts?populate=Posts.image

if you have images or image_video you can use this link:

http://localhost:1337/api/posts?populate=Posts.image&populate=Posts.images&populate=Posts.image_video

         

please tell me if that works for you!

Codemaker2015
  • 12,190
  • 6
  • 97
  • 81