How to Preserve Transparent PNG Backgrounds in SharePoint Hover Views
Question details
Users want to maintain the transparent backgrounds of circular PNG images when viewing enlarged hover previews in a SharePoint document library.

- 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.
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.
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.
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'.
At the bottom of the right-hand formatting pane, click on the 'Advanced mode' link to allow custom JSON input.
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.
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.
Adjust Thumbnail Dimensions (Known Limitation)
You can change the size of the preview using specific thumbnail tags to make circular images easier to see, though this will not remove the white background.
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. Download the Installer: Visit the official WPS Office website and download the free installation package for your operating system.
- 2. Install the Software: Run the installer and follow the simple on-screen instructions to set up WPS Office on your computer.
- 3. Open Your Documents: Launch WPS Office and open your existing Word, Excel, or PowerPoint files to experience perfect format compatibility and image rendering.

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.




