In our Salesforce org, I was working on a requirement for the sales team to customize record pages. They wanted to see the company logo on the account record page, and when clicked, it should redirect them to the company’s official website.
In Salesforce, there are two ways to add a clickable image as a field on the object record page: using a formula field or a rich text field.
In this Salesforce tutorial, I will explain how to create a clickable image in Salesforce with custom fields.
Clickable Image in Salesforce
In Salesforce, a clickable image is similar to a hyperlink that redirects to the embedded link when clicked. It combines the functionality of a hyperlink with the visual of an image, making Salesforce pages interactive.
For example, on an account record, we can show the company’s logo as a clickable image that redirects to the company’s official website.
Create a Clickable Image in Salesforce
To create a clickable image in Salesforce, there are several ways that we will discuss in the examples below.
- Create a clickable image using a formula field in Salesforce
- Create a clickable image using a text field in Salesforce
Create a Clickable Image Using a Formula Field in Salesforce
To create a clickable image in Salesforce, the easiest way is by using the object fields. In this example, I will show how to create a clickable image in Salesforce by using a custom formula field.
Now, navigate to the setup page of Salesforce Lightning and follow the steps below.
- On the setup page of Salesforce Lightning, select Object Manager, then the object in which you want to create a clickable image. In this example, I have selected the Account object.

- In the object setup, go to Fields and relationships and click New.

- Select the field type as Formula. In the next window, enter the field label and select the return type as Text. After this, click on the Next button.

- Enter the formula below in the formula editor and click Next.
HYPERLINK(
"https://salesforcefaqs.com/",
IMAGE("/resource/Clickable", "Salesforce", 50, 50),
"_blank"
)We have defined the formula as follows:
- https://salesforcefaqs.com: The link you want to open when the image is clicked.
- /resource/Clickable: Path of the image (upload it first as a Static Resource).
- Salesforce: Alt text (displayed if image fails to load).
- 50, 50: Width and height of the image.
- “_blank”: Opens the link in a new tab.
- To set up the field-level security, select the profiles that can access this field for the clickable image.

- Select the page layouts to make the custom field visible on the record pages and click Save.

Navigate to the object record page, and there you will see the custom field with the image from a static resource. As we click on the image, it will redirect to the URL that we have used in the formula.

This way, we can add a clickable image in Salesforce using a custom formula field.
Create a Clickable Image Using a Rich Text Field in Salesforce
Another way to create a clickable image in Salesforce is by using the custom rich text area field.
First, create a rich text field in the object, then follow the steps below to create a clickable image using a rich text field in Salesforce.
- After creating the custom rich text area field, open the object record in Edit mode.

- Go to the rich text field and add an image from the static resource or upload it from the system.

- Select the uploaded image and click on the link icon. Here, add the link title, then in the Link URL, add the target URL that should open when we click on the Image. After this, click on the Save button.

- Now, in the preview mode, when we click on the image, it will redirect to the URL that we have linked to the image.

This way, we can create a clickable Image using a custom rich text field in Salesforce.
Conclusion
In this Salesforce tutorial, we learned how to create a clickable image in Salesforce. In the above examples, we explored two methods: using a formula field and using a rich text field. Both methods enable us to display an image that functions like a hyperlink, redirecting to a target URL when clicked.
By following the above steps, you can add a clickable image on record pages to provide quick navigation to external or internal resources directly from Salesforce.
You may also like to read:
- Add Image to Classic Email Template in Salesforce Classic
- Add image to email template in Salesforce Lightning
- Add Login Button for User in Salesforce
- Upload Files in Salesforce
I am Bijay Kumar, the founder of SalesforceFAQs.com. Having over 10 years of experience working in salesforce technologies for clients across the world (Canada, Australia, United States, United Kingdom, New Zealand, etc.). I am a certified salesforce administrator and expert with experience in developing salesforce applications and projects. My goal is to make it easy for people to learn and use salesforce technologies by providing simple and easy-to-understand solutions. Check out the complete profile on About us.