How to Upload Product Images in Salesforce​

Adding the product images to Salesforce is important to drive your sales. Engaging and high-quality product images impact your customers directly. It will impact customer engagement, perception and lead their buying decisions. For businesses using Salesforce to manage product catalogs and customer relationships can upload product images efficiently. Understanding how to Upload Product Images in Salesforce is important to upload the images efficiently and make the product records more informative and dynamic.

This guide will tell you the different methods to upload product images to Salesforce, by using Salesforce files, Lightning components, static resources, etc. You can also upload the single and bulk images to Salesforce by using these methods. Read this blog to know about these methods and best practices to upload images to Salesforce and ensure image optimization. 

Why Upload Product Images in Salesforce?

It is important to Upload Product Images in Salesforce to improve visual context. It boosts the sales, improves the internal data understanding, enhances customer experience, and strengthens the branding by making the products visually appealing and easily identifiable across marketing, sales and service processes. 

Hence, it also allows for better visualization, quicker product recognition and more engaging customer interactions. Here’s why uploading product images to Salesforce 

  • Visual Clarity 

Upload product images will enhance the visual clarity and help the users to identify the products quickly. It reduces the errors and improves the quoting process. 

  • CPQ Integration

Images in the quote line editor help in configuration. 

CPQ Integration 

  • Internal Storage 

Images are uploaded to Salesforce and referenced by the unique ID or URLs.

Method to Upload Product Images in Salesforce

Here are the different methods you can use for Salesforce Product Image Upload 

Method 1: Upload Images by Using Salesforce  Files 

Salesforce files is the recommended method to upload product images. Here how you can do it 

  • Navigate to the Product Record

First, open the ” App Launcher”, open the ” Products” section and select the products whom you want to add images to in Salesforce. 

  • Use the Files Related List 

Next, scroll to the ‘files’ related list, tap on ” Upload files” and choose product images from your system.

  • Verify File Upload

Now the images appear under files. Preview it and upload to Salesforce.

Salesforce files only allow you to upload product images in specific formats, like JPG / JPEG, PNG, GIF, SVG (limited support). Maximum file size allowed is 2 GB and recommended image size is under 5 GB for better performance. So, while uploading images, I considered these formats and sizes, and completed the process successfully. 

Method 2: Upload Images by Using the “Lighting File Upload” Component

The “Lightning file upload” component is the standard and declarative way to add upload functionality to custom or Lightning components. While using this method, you get the drag and drop interfaces to browse files easily and make the process intuitive for users. Here is the step by step process to Add Product Images in Salesforce by using the lighting components. 

  • Add the Component 

Start embedding the <lightning-file-upload>  tag in lightning page or component HTML.

  • Associate With Record

Set the record-id attribute to the Salesforce record’s ID that you want to link with images. It ensures the proper data relationships. It would be the ID of your product record for product images. 

  • Define Accepted Formats

Use the accepted-formats attribute to mention which image file types are allowed ( like jpg, .png, .gif). It helps to maintain the data quality and prevents the unsupported files from being uploaded. Before uploading, you may use the image tools available online.

  • Customized User Guidance 

The label attribute allows to provides clear instructions or descriptive title to users such as the “ add product gallery photos” or “ upload product images”.

  • Complete Upload

Set the ‘onuploadfinished’ attribute to JavaScript function that executes after upload is complete. It refreshes the pages and shows you success messages that your files are uploaded. 

Method 3: By Using the Static Resources

You can also use the static resources to upload the product image to Salesforce. Navigate to the Setup > Static Resources, tap on the ” new” option, provide a name, choose an image file, set the cache control and click on the save button. Here is the step-by-step guide to uploading product images in Salesforce by using the static resources

  • Move to the setup option in Salesforce and tap on ” setup.”
  • Navigate to the ” quick find box”, find the ” static resources” option and select it under the custom code or user interface section.
  • Create on “ new” option 
  • Enter details now include name, description and cache control. 
  • Upload file by tap on “ choose file” and select the image (JPG, PNG, GIF, etc)
  • Next, tap on the “save” option

Method 4: By Using the External Image URLs

You can also Add Product Images in Salesforce by using the external image URL. By following this method, you need to create two custom fields on product objects, text field to store URL and formula field to display image. Here is the step-by-step process you should follow 

  • Add the external image host as a trusted site 
  • If you are using Salesforce Commerce, navigate to the “setup” option, then the security option and trusted URLs
  • Tap on ” New trusted URL” and then enter the base URL of the external image host. 
  • For context, tap on the ” all” option
  • In the CSP directives section, tap on img-src (images)
  • Save the changes now
  • Create a custom text field for URL
  • Navigate to Setup > Object Manager
  • Select the “product” object and go to fields and relationships 
  • Tap on the ” new” option and choose ” text” as the data type
  • Enter the “ field label” option and specify the length. Note the API Name like Product_Image_Link__c), as you’ll need it later.
  • Follow the prompts to set field-level security and add to the page layout, then tap on the ” save” option.
  1. Create a Custom Formula Field to Display the Image
  • Navigate to the Fields & Relationships  for the project object and tap on the ” new ” option
  • Choose “formula” as data type and select “text” option as formula return type
  • Enter ” field label” and tap on the next option
  • Use the IMAGE function with the API name of the text field in the formula editor. It seems IMAGE(Product_Image_Link__c, “”, 100, 100)
  • Use “” for alternative text.
  • 100, 100 is for the height and width in pixels

By following these steps, you can complete the field creation steps to set security and add to layouts, and then tap on the ” save” option.  

  • Add the External URL to Product Record
  • Move to the ” product ” record.
  • Edit the record and paste the external image URL into the custom ‘product image link’ text field. 
  • Save the records. The image must display into a custom “ product image” formula field on product detail page and related lists. 

How to Upload Product Images in Salesforce: Single Vs Bulk Workflows

Salesforce Product Image Upload is done at a time or in bulk, on the basis of size of your product catalog. Single uploads are work for quick updates, and bulk uploads are works for the large products without broken image links or errors. 

Single Image Upload (The Beginner Method)

Here is the step-by-step process you should follow to upload a single image to Salesforce

  • Navigate to the “ products” tab, and then open product records
  • Tap on the “ details” tab and then find the “ product image” field 
  • Tap on the upload icon
  • Select the file, and then tap on the ” Open” option 

Tip: Rename the image file before uploading it. Because once you upload it in salesforce, you can’t change the file name without API work.

Bulk Image Uploads (When You Have 500+ Products)

Here is the step-by-step process you can follow to upload bulk images in Salesforce

  • Export your product IDs to CSV
  • Add the column “Image_URL__c” 
  • Host images on CDN (like AWS S3) or Salesforce Files
  • Add URLs in CSV, https://yourdomain.com/image1.jpg
  • Then use the data loader to update records in CSV

Best Practices for Image Uploading in Salesforce

Optimizing the image management in Salesforce is not only about uploading files. You must follow the strategic approach to organize and upload the images and ensure the data integrity, optimal performance and better user experience. Here are the Salesforce product image best practices

  • Optimize Image Size

You should resize and compress the images files to make it suitable to Upload Product Images in Salesforce. Don’t upload large files otherwise it slows down the page load times, and takes the unnecessary storage space. Set the balance between the image quality and file size. 

  • Use the Right File Formats

Use the right image file formats compatible with salesforce like PNG, GIF and JPEG. These formats facilitate the good compatibility and compression features on different browsers and devices. Don’t use the less compatible formats, otherwise it affects accessibility for users. 

  • Implement Naming Convention

Set a consistent naming convention for image files and make it easily identifiable and searchable. Ensure to include the relevant dates, keywords and records ID in file names and help the users to find your product images easily. 

  • Organize Images in Folders

Organize the images in logical folder structure and categorize it. Use the descriptive folder names to organize it better and reflect the content of images. It makes it easier for the users to navigate and find the images of specific products. 

  • Set the right Access Controls

Use the right access control and sharing settings, and manage access to product images. Only give access to the authorized users that view, upload and modify the images on the basis of roles and responsibilities. It maintains data security and prevents unauthorized access to sensitive content. 

  • Regularly Review and Clean Up

Review your product image library regularly and remove duplicate, unused and outdated images. It keeps your Salesforce library clean and reduces clusters. Make sure to implement the retention policy to delete old images automatically after a specific period. 

  • Leverage the Visual Design Principles 

While uploading product images in Salesforce, consider the elements of photo manipulation and graphic design. It ensures the consistency in branding, background and lighting across all product images. 

It emphasizes beautiful and aesthetic photography and becomes an excellent source for creative ideas to guide you in visual designs.

Conclusion 

Understanding how to upload product images in Salesforce is important to build a user-friendly and modern CRM experience. The Salesforce software gives multiple ways to manage and optimize the images, as per your business needs. But you must choose the right method to upload product images in Salesforce on the basis of scalability, integration and performance requirements. 

Salesforce files combined with the lightning components give you the best balance of flexibility and control. For web integrations or large organizations, external image hosting is a suitable method. Make sure to follow the best practices above and follow the right method to add visually rich images in Salesforce.

Table of Contents

Share Post

Picture of Forceperformers Team

Forceperformers Team

Related Blog

SEO Guide 2022 for Salesforce Partners
Salesforce Consulting
Forceperformers Team

SEO Guide 2022 for Salesforce Partners?

SEO Guide 2022 for Salesforce Partners In today’s digital-first world, Salesforce partners must leverage Search Engine Optimization (SEO) to stay competitive. With thousands of consulting

Read More »

Latest Salesforce Articles