SharePoint Document Issues

How to Preserve Transparent PNG Backgrounds in SharePoint Hover Views

Steve KSteve K Oct 21, 2026 869 views

Question details

Users want to maintain the transparent backgrounds of circular PNG images when viewing enlarged hover previews in a SharePoint document library.

How to Preserve Transparent PNG Backgrounds in SharePoint Hover Views
Product
SharePoint
Device & OS
not provided
Scenario
Hovering over a PNG image file in a SharePoint document library to view an enlarged thumbnail preview without opening the item.
Observed behavior
SharePoint's native thumbnail renderer strips the image transparency and replaces it with a solid white background in the hover preview card.
Before you start

Keep in mind that SharePoint automatically generates optimized thumbnails for hover previews, and this native rendering process intrinsically drops the alpha channel (transparency) of PNG files.

Solution 1Recommended

Use Custom JSON Formatting to Reference the Original Image

Bypass SharePoint's default thumbnail rendering engine by customizing the column formatting to load the original transparent PNG instead of the auto-generated preview.

By default, SharePoint fetches a performance-optimized thumbnail (which introduces a white background) for the hover card. By utilizing JSON column formatting, you can force the hover card to display the original file, effectively preserving the transparent background.

1
Access Column Settings

Navigate to your SharePoint document library, click on the column header where your images are listed, and select 'Column settings' followed by 'Format this column'.

2
Enable Advanced Mode

At the bottom of the right-hand formatting pane, click on the 'Advanced mode' link to allow custom JSON input.

3
Apply Custom JSON

Write or paste a custom JSON payload for your hover card (customRowAction or customCardProps) that sets the image 'src' attribute to `[$FileRef]` (the direct file path) instead of the default thumbnail URL.

4
Save and Test

Click 'Save' at the bottom of the pane. Hover over your circular PNGs in the library to verify that the transparent background is now preserved.

Performance Consideration: Loading the original `[$FileRef]` image instead of the optimized thumbnail preserves transparency but may slightly increase load times if your PNG files are very large.
Free Microsoft Office alternative

Create and Manage Documents with Perfect Image Rendering in WPS Office

While SharePoint and Microsoft 365 might struggle with image transparency in auto-generated previews, WPS Office ensures your transparent PNGs look absolutely perfect inside your documents, spreadsheets, and presentations. WPS Office is a highly compatible, free, and lightweight alternative to Microsoft Office that offers a familiar interface for a seamless transition.

  1. 1. Download the Installer: Visit the official WPS Office website and download the free installation package for your operating system.
  2. 2. Install the Software: Run the installer and follow the simple on-screen instructions to set up WPS Office on your computer.
  3. 3. Open Your Documents: Launch WPS Office and open your existing Word, Excel, or PowerPoint files to experience perfect format compatibility and image rendering.
Flawless rendering of transparent PNGs and complex graphicsFree and lightweight office suite for Windows, Mac, and LinuxHigh compatibility with Microsoft Office formats (.docx, .xlsx, .pptx)Familiar user interface for seamless migration and zero learning curve
microsoft office alternative - wps office

Frequently Asked Questions

Why do transparent PNGs get a white background in SharePoint previews?

To improve performance and loading times, SharePoint automatically generates a compressed thumbnail of your original image for the hover preview. This server-side conversion process strips the image's alpha channel, replacing transparent areas with a solid white background.

Is there a specific SharePoint thumbnail tag that supports image transparency?

Currently, SharePoint does not offer a natively supported thumbnail rendering tag (like @thumbnail.preview) that retains PNG transparency in document library hover views.

Can I use CSS to force the background to be transparent in SharePoint previews?

In modern SharePoint environments, custom CSS injection is highly restricted. Instead of CSS, you must use SharePoint's JSON Column Formatting feature to adjust how the hover card fetches and renders the image.