I am trying to add images to a live agent deployment that is embedded in an External Website. The images are stored in Static Resource and I have set the Cache-Control as Public. If I put the live agent code in a VF page and preview it, I can see the images fine, but the same code embedded in the Website does not work.

I have added the line embedded_svc.settings.prechatBackgroundImgURL = "{!$Resource.prechatBackground}" to the embedded deployment code.

If I check the browser console, I am able to see the error message: Failed to load resource: the server responded with a status of 404 (Not Found) - %7B!$Resource.prechatBackground%7D:1

Has anyone experienced this before? Do I need to add the Image URL in a different way?

Thank you for your time,



1 Answer 1


Can you share the image URL of your static resource?

Usually the value="{!$Resource.prechatBackground}" generates a relative URL from which the image is rendered (example: "/resource/1312483024000/logo"). This URL is accessible only for authenticated platform users which is why it can be seen in VF page.

Also, when we store images as static resources, the field "Cache Control" = "Public" specifies that the static resource data cached on the Salesforce server be shared with other users in your organization for faster load times. Setting it "Public" will not allow it to be accessible outside salesforce Org.

For these images to be available,you can try to use something like "nax.salesforce.com/resource/1312483024000/logo"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.