How to Add Photos to Salesforce Records with a Rich Text Field

A no-code, step-by-step walkthrough for putting photos on Contact records (or any object), with screenshots along the way.

By Marlin, Salesforce Admin 11 min read

A Salesforce Contact record for Mei-Lin Zhang, with her title, account, phone and email in the header and her headshot in a Photo section at the top of the right-hand column
The finished result: a photo right on the Contact record.

Photos make Salesforce feel human. A face next to a name helps a front-desk volunteer greet a parishioner by name, helps a new teacher learn the staff, and helps a development officer recognize a board member before the meeting starts. Photos are also the raw material for anything visual you'll build later: welcome packets, staff boards, and printed directories.

There's a catch. Out of the box, Contact records don't have a photo field you can upload to. User records get profile photos, but Contacts, Leads, and most custom objects don't. The good news is that you can fix this in about 15 minutes, with no code, using a field type every org already has: the Rich Text Area.

This guide walks through the whole process: creating the field, giving it a prominent spot on the record page, adding photos, and getting them into your reports.

What you'll need

  • Permission to customize your org (System Administrator, or a profile with Customize Application).
  • Lightning Experience. The steps and screenshots in this guide use Lightning.
  • A few photos to test with: JPG, PNG, or GIF, each under 1 MB.

The short version

  1. Create a Text Area (Rich) field called Photo.
  2. Choose who can see it and add it to your page layouts.
  3. Move it somewhere people will notice, like the top of the record page.
  4. Add a photo by pasting it or uploading a file.
  5. Add the field to your reports so you can use the photos elsewhere.

Why a Rich Text field?

A Rich Text Area field is a text box with a formatting toolbar, and it can hold images as well as text. When you add a photo to one, Salesforce stores the image in your org and displays it right on the record. You don't need outside hosting, formulas, or a component to install.

There are other ways to get images into Salesforce. Here's how they compare:

Option Shows on the record page Stored in Salesforce Good to know
Rich Text Area field Yes Yes No code. One field, and you paste or upload the photo in the editor. The approach in this guide.
Salesforce Files As a file in the Files list Yes Great for storing many images per record, but the photo isn't displayed on the page without an extra component.
URL field + IMAGE() formula Yes Usually not The image lives at an outside web address. It breaks if the link moves, and the domain may need to be added to Trusted URLs.
AppExchange app or custom component Yes Varies More features, such as galleries and cropping, but more to install, license, and maintain.

If you want people to see a photo the moment they open a record, and you want to set it up today without help from a developer, a Rich Text field is the simplest choice.

Step 1: Create the Photo field

  1. Click the gear icon in the top-right corner and choose Setup.
  2. Click the Object Manager tab, then click Contact. Typing "Contact" in the Quick Find box is the fastest way to find it.
  3. In the left sidebar, click Fields & Relationships, then click New.
Object Manager showing the Contact object, with Fields & Relationships selected in the sidebar and the New button highlighted above the field list
Fields & Relationships on the Contact object. Click New to start.
  1. Select Text Area (Rich) and click Next.
The data type list in the New Custom Field wizard, with Text Area (Rich) selected and the Next button highlighted
Choose Text Area (Rich) as the data type, then click Next.
  1. Fill in the field details:
    • Field Label: Photo. Salesforce fills in the Field Name for you, and the API name becomes Photo__c.
    • Length: leave the default (32,768). The field stores a short snippet of HTML that points to the image, not the image itself, so a photo won't come close to the limit.
    • # Visible Lines: the default is 25. Set it to about 10. It controls how tall the box is while you're editing.
    • Help Text (optional, but kind to your users): something like "Upload a square headshot. JPG, under 1 MB." It appears as an info icon next to the field.
  2. Click Next.
Step 2 of the wizard, Enter the details, with Field Label set to Photo, Length 32,768, # Visible Lines 10, Field Name Photo, and help text filled in. Field Label, # Visible Lines and Help Text are highlighted.
Name the field Photo, keep the default length, and add help text.
Not just for Contacts

The same steps work on Accounts, Leads, and custom objects like Volunteers, Students, Properties, or Equipment. Pick that object in Object Manager instead.

Step 2: Choose who can see it and add it to page layouts

The remaining screens of the wizard control access and placement.

  1. Field-Level Security: check Visible for every profile that should see photos. If a profile should see photos but not change them, check Read-Only too. Then click Next.
Step 3 of the wizard, Establish field-level security, showing a list of profiles with Visible and Read-Only checkbox columns. The Visible column is highlighted.
Decide which profiles can see the Photo field.
  1. Add to Dynamic Forms-enabled record pages: you'll only see this step if the object already has a Lightning record page that uses Dynamic Forms. Leave the page checked and click Next.
  2. Add to Page Layouts: leave your Contact page layouts checked so the field appears on records. Then click Save.
The Add to page layouts step, with four Contact page layouts checked and the Save button highlighted
Keep the layouts checked, then click Save.
Using permission sets?

If your org manages access with permission sets instead of profiles, skip the profile checkboxes. Grant Read on the Photo field in the right permission set, plus Edit for whoever will upload photos.

The field now exists. Salesforce adds it as the last field in the first two-column section of each layout (or the first field section of a Dynamic Forms page), which is rarely where people will notice it. That's the next step.

Step 3: Put the photo where people will see it Recommended

A photo buried at the bottom of the Details tab doesn't do much. You have two options, depending on how your Contact record page is built.

Option A: Move it on the page layout (simplest)

  1. Go to Setup › Object Manager › Contact › Page Layouts and open your layout (often named Contact Layout).
  2. Drag the Photo field to the top of the first section. You can also add a new section called "Photo" and put it there.
  3. Click Save.

Option B: Give it a spot in the sidebar with Dynamic Forms

Dynamic Forms lets you place individual fields anywhere on a Lightning record page. That makes it easy to put the photo in its own card near the top of the page, like a profile picture.

  1. Open any Contact record, click the gear icon, and choose Edit Page. Lightning App Builder opens.
  2. If the page still uses a single Record Detail component, click it and choose Upgrade Now to switch to Dynamic Forms. Salesforce copies your existing layout into field sections, so nothing is lost.
  3. Click the Fields tab and drag a Field Section into the right-hand column, near the top. In the properties panel, give it a label like "Photo."
  4. From the same tab, drag Photo into the new section. If Photo also appears somewhere else on the page, select that copy and delete it.
  5. Click Save. If this is a new page, click Activate and assign it.
Lightning App Builder editing the Contact Record Page. The Fields tab is open with Field Section highlighted, and a section labeled Photo containing the Photo field is highlighted at the top of the right-hand column.
With Dynamic Forms, the photo gets its own section near the top of the page.
Don't see Upgrade Now?

Dynamic Forms is available on custom objects and the most common standard objects, including Accounts and Contacts. If it isn't offered for your object, Option A works everywhere.

Step 4: Add a photo to a record

Two limits to know

Salesforce only accepts JPG, PNG, and GIF images up to 1 MB each. The limit is built in and can't be raised. You also can't resize an image once it's in the field, in either Lightning Experience or the mobile app. Crop and resize before you add it (see best practices below).

There are two ways to get a photo into the field. Pasting is quickest when the photo is already in front of you. Uploading a file suits larger photos and keeps the file name.

Paste it

  1. Copy the photo. In an email or on a web page, right-click the picture and copy the image. In a photo app, select it and press Ctrl+C (Cmd+C on a Mac).
  2. Open a Contact record and click the pencil icon next to the Photo field, or click Edit.
  3. Click inside the Photo field and press Ctrl+V (Cmd+V on a Mac). The photo appears in the field.
  4. Click Save.
Pasting works best for small photos

In our testing, a pasted photo went in as a PNG named image.png, which is a much bigger file than the same photo saved as a JPG. A 600-pixel headshot pasted without trouble. A larger photo was turned away for being over 1 MB, even though its JPG file was well under the limit. If that happens, upload the file instead.

Copy the picture itself, not a block of text or a web page that contains it. Salesforce doesn't support pasting in content that has images embedded in it.

Upload a file

  1. Open a Contact record and click the pencil icon next to the Photo field, or click Edit.
  2. In the Photo field's toolbar, click the Image button (the picture icon). Your computer's file picker opens.
The Photo field in edit mode, showing its rich text toolbar with the Image button highlighted
The Image button is in the field’s toolbar.
  1. Choose a photo and click Open. The photo appears in the field right away.
The Photo field in edit mode with a headshot now showing in the editor, and the Save button highlighted at the bottom of the page
The photo appears in the field as soon as you choose the file. Click Save to keep it.
  1. Click Save. The photo now appears on the record, like the example at the top of this guide.

Step 5: Add the Photo field to your reports

A report won't display the pictures. Its Photo column shows each image's file name as text. Adding the field to a report still matters, because that is how tools that work from report data find the photos.

  1. Open your Contacts report and click Edit. To start a new one, go to Reports › New Report, choose Contacts & Accounts, and click Start Report.
  2. In the Outline panel, under Columns, type Photo in the Add column box and select it.
  3. Click Save.
Report Builder with First Name, Last Name, Title, Contact ID and Photo in the Columns list. Photo is highlighted in the list and in the preview, where the column shows the file name mei-lin-zhang.jpg for one contact.
Add Photo as a report column.

Photo best practices

A little prep before you upload makes every photo look better, on screen and in print.

Adding photos at scale

Uploading one photo at a time is fine for a 15-person board. For 1,500 members, it pays to plan.

Troubleshooting

"The image exceeded the maximum size of 1 MB"

The 1 MB cap is fixed. Resize the photo to about 600 pixels wide and save it as a JPG, which brings it to a small fraction of the limit. If you pasted the photo, upload the JPG file instead, because a pasted photo goes in as a much larger PNG.

The Photo field doesn't appear on the record

Check three things: field-level security (or your permission sets) gives your profile access, the field is on the page layout assigned to your profile and record type, and, if you used Dynamic Forms, the page you edited is the one activated for your app and profile.

Other people can't see the photos

Their profile or permission set needs Read access to the Photo field. Check this first when photos show up for admins but not for anyone else.

A broken image icon shows instead of the photo

This usually happens when photos were loaded by Data Loader, a script, or an integration, and the image link points at your my.salesforce.com domain or an outside website. Lightning pages load from a different domain, so the browser blocks the image. Add the photo again through the editor, by pasting or uploading, and Salesforce will write a link that works.

The photo is too big, too small, or stretched

Lightning doesn't let you resize images inside the field. Crop and resize the original file, delete the image from the field, and upload it again.

Frequently asked questions

Does Salesforce have a built-in photo field for Contacts?

Not one you can upload to. User records have profile photos, but Contacts, Leads, and custom objects don't. A Rich Text Area field is the most common no-code way to add one.

What image types and sizes can I upload to a Rich Text field?

JPG, PNG, and GIF files, up to 1 MB each. The 1 MB limit is fixed and can't be raised, so resize large photos before uploading.

Do photos in Rich Text fields count toward Salesforce storage?

Yes. Images in Rich Text Area fields count toward your org's file storage. A typical 600-pixel JPG headshot is around 100 KB, so 1,000 photos uses roughly 100 MB.

Can I resize a photo after I upload it?

Not in Lightning Experience or the Salesforce mobile app. Crop and resize the photo before you upload it. To change it later, delete the image from the field and upload a new version.

Will the photos show in the Salesforce mobile app?

Yes. Rich Text fields display in the Salesforce mobile app, so anyone who can see the field sees the photo on their phone too.

Does this work for objects other than Contacts?

Yes. You can add a Rich Text photo field to any object that supports custom fields, including Accounts, Leads, and custom objects like Volunteers, Students, Properties, or Equipment.

Turn your photos into a directory

Once your records have photos, you can do a lot more with them. One request every admin hears eventually: "Can we get a photo directory?" A staff directory, a parish directory, board bios, a volunteer roster. Built by hand, that means hours of copying photos into a document that's out of date by next month.

That's why we built DirGen for Salesforce. It's native to Salesforce and turns a tabular or summary report into a print-ready PDF photo directory. You pick the report, choose a template (9-Up, Roster, or Profile), map your fields, preview, and download. When the data changes, you can regenerate the directory from your saved settings.

The Rich Text field you just set up is all DirGen needs, because it reads the first image in the field. Make sure your report includes the record ID (for Contacts, Contact ID) and the Photo column, then set the photo method to Rich Text in DirGen Setup. If you already keep photos in Salesforce Files, DirGen reads those too.

A DirGen 9-Up directory page: nine people per page, each with a photo, name, and contact details
A 9-Up directory page generated by DirGen from a Salesforce report.

Try DirGen free for 14 days

No credit card required. Install it from AgentExchange and make your first directory in minutes.

Get DirGen on AgentExchange

Written by Marlin, a Salesforce admin in Portland, Oregon, and the creator of DirGen. Does a step look different in your org? Email [email protected] and we'll update the guide.