Fix: Salesforce “Chatter” files not rendering in the UI

When users attach images, PDFs, or office documents to Salesforce Chatter feeds, groups, or record posts, the file preview in the Lightning Experience user interface may fail to render. Instead of displaying a clean document preview, the modal remains blank, displays a broken image icon, or spins indefinitely. This issue occurs when browser privacy shields block Salesforce file delivery domains, platform preview-generation queues lag, or Salesforce File Upload and Download Security policies restrict inline browser execution.

Fast Fix

Check your browser for blocked cross-site content or ad blockers blocking *.documentforce.com. Then, navigate in Salesforce to Setup > File Upload and Download Security. Find the file format (such as PDF or PNG), click Edit, and ensure its behavior is set to “Execute in Browser” rather than “Download” or “Hybrid.”


Diagnostic Snapshot

  • Error Symptoms: File preview modal spins forever, previews show broken document icons, or clicking a thumbnail immediately forces a file download instead of opening the viewer.
  • Underlying Architecture: ContentDocument, ContentVersion, and the Salesforce Documentforce preview rendering service.
  • Primary Scope: Chatter feed items, record feed attachments, and Salesforce Files component.
  • Permissions Required: System Administrator access to edit Session Settings and File Upload and Download Security.

Understanding the Chatter File Rendering Pipeline

When an asset is uploaded to Chatter, Salesforce handles the file through a background ingestion process:

  1. Storage Record Creation: The system creates a ContentVersion record and links it to a parent ContentDocument.
  2. Asynchronous Preview Generation: The platform sends the raw binary data to a dedicated rendering engine. This engine builds SVG and HTML5 preview representations of document pages.
  3. Delivery via Content Domain: Previews are delivered not from your primary Lightning domain, but from a dedicated caching content delivery domain (e.g., .documentforce.com or .file.force.com).

If the preview generation queue is delayed, if the user lacks sharing rights to the underlying ContentDocumentLink, or if the browser treats the file delivery domain as an untrusted third-party tracker, the UI viewer fails.


Diagnostic Path

Chatter File Fails to Render
 ├── Does the issue affect only one specific user?
 │    ├── Test in Incognito mode: If it works ──► Disable browser extensions / ad blockers
 │    └── Check Record Sharing: Does the user have access to the parent record?
 ├── Does the issue affect all users for a specific file type (e.g., PDF)?
 │    └── Check Setup ──► File Upload and Download Security ──► Set to "Execute in Browser"
 └── Is the preview a blank canvas or spinning wheel immediately after upload?
      └── Preview generation queue lag ──► Check platform status or re-upload file

Step-by-Step Resolution

1. Adjust File Upload and Download Security Settings

Salesforce applies strict security policies to protect users from malicious scripts embedded in uploaded documents. If a file extension is set to download only, Lightning Experience suppresses the inline preview.

  1. Go to Setup > enter File Upload and Download Security in the Quick Find box.
  2. Select File Upload and Download Security.
  3. Locate the file extension causing issues (e.g., .pdf, .png, .docx).
  4. Click Edit.
  5. Set the security setting to Execute in Browser (or Hybrid if strict corporate security requires download execution for unauthenticated portal guests).
  6. Click Save.
  7. Return to the Chatter post and refresh the page to test the preview.

2. Whitelist Documentforce Domains in Browser Shields

Modern browsers (and privacy extensions like uBlock Origin or Privacy Badger) frequently flag documentforce.com as a third-party tracking domain because it differs from your primary org domain (lightning.force.com).

  • Test the behavior: Open an Incognito / Private Window with all browser extensions disabled and log into Salesforce.
  • If the preview renders properly in Incognito, an extension or browser shield is intercepting the canvas request.
  • Add your Salesforce organization domains to your browser’s allowed list:
    • .salesforce.com
    • .force.com
    • .documentforce.com

3. Inspect ContentDocumentLink Sharing Permissions

If a file is posted to a private Chatter group or an internal record, other users will see the Chatter post metadata, but the file preview canvas will show an access error or remain blank.

  • Files posted to standard records inherit the record’s visibility, but files posted to user profiles default to private.
  • Run a SOQL query in the Developer Console to verify sharing visibility: SELECT Id, ContentDocumentId, LinkedEntityId, ShareType, Visibility FROM ContentDocumentLink WHERE ContentDocumentId = '069XXXXXXXXXXXX'
  • If Visibility is set to InternalUsers and community/portal users cannot render the preview, update the visibility to AllUsers. If users face broader record-level permission errors, see Fix: Salesforce “You do not have the required permissions” (Identity Loop).

4. Clear Preview Generation Stalls

Occasionally, the background preview-generation worker fails on large, image-dense PDFs or password-protected files.

  • Password-Protected Files: Salesforce cannot generate previews for encrypted or password-locked PDFs and Word documents. These files must be downloaded and opened locally.
  • Re-triggering Previews: If a standard file fails to process, upload a new version by opening the file details page and clicking Upload New Version. This registers a new ContentVersion ID and restarts the preview converter service.

Common Misdiagnoses


Hard Stops

  • Do not set executable file formats (.exe, .bat, .js) to “Execute in Browser.” Doing so creates severe cross-site scripting (XSS) vulnerabilities. Restrict inline browser execution strictly to trusted media, image, and document extensions.