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
Puneet_MishraPuneet_Mishra 

Sandbox Image source in rich text area pointing to production url

We got contact extract from production and there is a field of data type rich text area which is been used to store contact image. Data loading team uploaded the data to sandbox and we were able to display the images in our lightning component but image do not displayed on community when investigate we found out image source is pointing to production i.e. (img src="https://production.salesforce.com/servlet/servlet.ImageServer?id=01541000002yi92AAA&oid=00D41000000XUZ3") instead of sandbox. When we tried to upload the image manually the image src displays as (img src="/sfsites/c/servlet/rtaImage?eid=0035400000HkFAR&feoid=00N4100000eTIwO&refid=0EM5400000050K5")
Can anyone explain me
1. how image of production url is getting displayed in lightning component and on contact detail record but not on community?
2. How can we resolve this issue ?
I tried to search for solution but no luck. I appreciate your help.
Thank you in advance.
Shraddha_KhanapureShraddha_Khanapure
We had the same issue in community using rich text field for the images. This limitations with RTF field for images are given in this article with few workaround - https://help.salesforce.com/articleView?id=000330220&type=1&mode=1 (https://help.salesforce.com/articleView?id=000330220&type=1&mode=1)

Few other ways to show images in community :
  1. Use static resource and import in lightning component
  2. Use of Asset Files in Files --> Library and import in lightning component
  3. Upload images in RTF field from documents - https://salesforce.stackexchange.com/questions/235602/rich-text-area-image-not-showing-up-in-community
Regards,
Shraddha