Loading
Salesforce now sends email only from verified domains. Read More
Visual Studio Code Based Modeler for Consumer Goods Cloud
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Update an Image

          Update an Image

          Add custom or modified images and icons in the app by updating the corresponding image contract.

          Required Editions

          Available in: Enterprise, Performance, and Unlimited Editions
          User Permissions Needed
          To update an image Customizer, Admin
          1. At the command prompt or in a Terminal window, change directory to the folder where the custom or replacement image file is saved.
          2. Generate the Base64-encoded string for the replacement image file. Run: sf modeler workspace utils base64encode --input $filePath$.
            For --input $filePath$, specify the path to the file for which the Base64-encoded string is required. The Base64-string of the file is written to the console.
          3. Open the image contract of the existing image that you want to update.
          4. Copy the new Base64-encoded string from the console to the <default> tags.
          5. Update the mimetype attribute if the new image file format is different from the existing format.
            Image Format Mimetype Value
            image.svg image/svg+xml
            image.png image/png
          6. Save your changes and check in the modified image contract.
          Example
          Example

          Modified Barcode.image.xml image contract

          <?xml version="1.0" encoding="utf-8"?>
          <Image xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Barcode" schemaVersion="0.0.0.5">
            <default mimetype="image/png">LDE3LjYsMTUuOSwxNC45LDE1eiIvPg0KCTwvZz4NCgk8ZyBpZD0iVW5yZWFkX01lc3NhZ2UiPg0KCTwvZz4NCgk8ZyBpZD0iRWRpdF9NZXNzYWdlIj4NCgk8L2c+DQoJPGcgaWQ9IkluYm94Ij4NCgk8L2c+DQoJPGcgaWQ9IkFkdmFuY2VkX1NlYXJjaCI+DQoJPC9nPg0KCTxnIGlkPSJJZGVhX3gzRl8iPg0KCTwvZz4NCgk8ZyBpZD0iUGFja2FnZXMiPg0KCTwvZz4NCgk8ZyBpZD0iX3gzRl9fMV8iPg0KCTwvZz4NCjwvZz4NCjwvc3ZnPg0K
          <!-- details skipped for brevity -->
            </default>
          </Image>
           
          Loading
          Salesforce Help | Article