New: Learn Statamic on Laracasts!

We've retired the forum in favor of GitHub Discussions.

New conversations can be started on GitHub. Existing conversations will remain for a while longer.

Head over to GitHub →

Linked images not shown in API

Rizky Syazuli April 9, 2021 by Rizky Syazuli

Hi, it's me again.. So I have a banners field on my homepage which links entries from another banners collection. Seems like a typical scenario.

title: Home
blueprint: home
  - 12d5e948-f545-4ca4-9d84-7c41205687cf
  - 8212c834-f9ab-4e1a-a7b9-b1d1d6da1166
  - 560d1da0-e73b-4624-bdba-137bb464d2ef
id: home

But when I fetch the home page via API, the image url all return empty. What seems to be the problem?

  "data": {
    "banners": [
        "id": "12d5e948-f545-4ca4-9d84-7c41205687cf",
        "title": "Home Banner 1",
        "url": "\/",
        "permalink": "http:\/\/mysite-cms.test",
        "api_url": "http:\/\/mysite-cms.test\/api\/collections\/banners\/entries\/12d5e948-f545-4ca4-9d84-7c41205687cf"
>>>>>>> Unanswered <<<<<<<
2 Replies