â–Ľ
Streaming live at 10am (PST)

Image API URL, in Embedded Image, does not display

Hi guys,

So, I am displaying an Image via the EMBED feature, that pulls the image source - which is a API image URL - from a CMS Collection. However, this works fine on my laptop. But everywhere else the image cannot get displayed; Failed to load resource: the server responded with a status of 401 (Unauthorized)

How can i resolve this issue?

Cheeers

Where are you pulling that image from? did you set the proper authorization headers on the request?

The image url is pulled from a CMS collections, that contains the API ID of the image

I do not think i have not that Jean, how would i go about doing this

this is the embed code i am using currently; <img src="CMSfield" width="100%" height="auto">

Can you please share a read-only with us? Seems to me that The problem here is that you’re trying to get a file that requires you to be authenticated…when I have the read-only I’ll be able to have a better look at it

Sure.

https://preview.webflow.com/preview/smartcat?utm_medium=preview_link&utm_source=designer&utm_content=smartcat&preview=fc944a892db902396f2ae192491c976b&mode=preview

I think you are right that the file requires authentication

That means you can only access the resource with authentication. A file upload via a form?

I have the same problem. And yes, the image is uploaded via a form.

https://preview.webflow.com/preview/personal-coach-4-you?utm_medium=preview_link&utm_source=designer&utm_content=personal-coach-4-you&preview=9eb3f6d7bfd8a05c309156c8233749d2&pageId=5f29b47e54f0fd93956717b3&mode=preview

Never mind, I just fixed it. I needed to turn off “Restrict uploaded file access” (Project settings > Forms)

1 Like