0

First of all I've seen Accessing image url in Strapi and Strapi v4 REST API :GET image and Media field is not showing up in api response of strapi v4 which all tell to add ?populate=* to the request. I am already doing that.

I'm calling my API endpoint http://my-url/api/my-type?populate=* and everything is returned, including everything else but the image URL. I can also confirm that populate=* is working as if I remove it I also stop getting many fields too.

In content manager, I can see the file is uploaded, and is accesible through the obtained URL by tapping "copy link", so the file is there too.

How can I get the image URL in Strapi API request? I'm on Strapi v4.1.8.

Can Poyrazoğlu
  • 33,241
  • 48
  • 191
  • 389
  • Hi, your problem likely that `populate=*` gives you only first level of relations, if your image included in component or inside of relation it would not be populated, to give you exact answer, you need to update answer with some sort of data layout you are querying – antokhio Dec 04 '22 at 09:41
  • You can check https://stackoverflow.com/questions/74564780/media-files-not-showing-in-api-with-strapi/74578582?noredirect=1#comment131678852_74578582 – antokhio Dec 04 '22 at 09:44

0 Answers0