[SalesForce] How to set public inline images in Knowledge Base Article

Background

I'm developing an standard FAQ using Knowledge Base Articles. I've defined an Article Type FAQ which contains a Rich Text field called "Answer".

The FAQ articles are exposed to an external web site through a custom Apex web service. That WS query and sort the content that should be render by the external site.
This Apex hit the FAQ_kav object to get the field content.

Note: the WS is hit by a full access API user.

So far, everything is working fine, but:

Issue

When the user insert an inline image using the Rich Editor's upload function, that image is store in something like: https://c.cs20.content.force.com/servlet/rtaImage?eid=ka3m0000000XXXX&feoid=00Nm0000000XXXX&refid=0EMm0000000XXXX

That domain (c.cs20.content.force.com) is checking the session and hence the image is private. Even when I've checked the article for Public Knowledge Base channel.

I understand that that image will be stored as a document, but I'm not abled to check as "Externally Available Image" for standard docs.

Question

Is any security setting that I should enabled in order to expose public access to that content(images).

Best Answer

You can expose the image through a site. You only need to change the instance url by the site home page.

Also, you need to establish the article as public.

Site Profile Changes:

  • Set field where image is placed as visible.

  • Set Read permission to object where image is placed.

  • Go to "Category Group Visibility Settings" section and set visibility to "All Categories" in the article/s group/s.

For example:

If you have this site:

https://mysite-developer-edition.cs20.force.com/home

And your original image url is:

https://c.cs20.content.force.com/servlet/rtaImage?eid=ka3m0000000XXXX&feoid=00Nm0000000XXXX&refid=0EMm0000000XXXX

Your public image would be:

https://mysite-developer-edition.cs20.force.com/home/servlet/rtaImage?eid=ka3m0000000XXXX&feoid=00Nm0000000XXXX&refid=0EMm0000000XXXX

This workarround would work with any image in a Rich Text Area.

Related Topic