function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Jon Walker 15Jon Walker 15 

Displaying Images Embedded In Rich Text Field

I'm accessing Salesforce Using the PHP Toolkit (latest stable).

My client recently began storing images in a Rich Text Field and when querying this table I get the image as an <img src=*> tag.

These images won't display on the page and I cannot directly view the image by visiting the src URL of the image.

An example of the img tag is as follows (redacted):
<img alt="User-added image" src=";feoid=####&amp;refid=####" style="height: 375px; width: 500px;"></img>

I suspected a permissions issue but the client team rejected this suggestion and told me it was an implementation issue.

Ultimately what we would like to do is get the source image and save it on a separate image CDN.

Can anyone point me in the right direction?

Jason HardyJason Hardy
I think you're correct. If you're authenticated into SFDC, are you able to go to the image tag directly? If so then it sounds like the image isn't being externally shared by Salesforce. If you're looking to just store the image somewhere else you could try querying the content directly. The following has an example (granted within SFDC, but you should be able to use a similar query via the PHP toolkit)