Skip to content

Display DWG Thumbnails Automatically in SharePoint

Learn how to generate DWG thumbnails with the Drawings SDK, store links in SharePoint, and render the previews in document libraries with client-side rendering.

Engineering teams expect SharePoint to show DWG previews the same way Windows Explorer does. In this guide we explain how to generate those thumbnails, store the links, and surface the images directly in a document library view.

Challenge

Out of the box, SharePoint displays AutoCAD drawings as generic file icons. That slows down review workflows because users have to open each file to confirm whether it is the right plan.

SharePoint document library showing DWG files without thumbnails

The Windows Explorer experience is far better: every DWG already shows a preview. Replicating that behavior in SharePoint is the goal of this walkthrough.

Windows Explorer displaying DWG thumbnails

Solution

Delivering thumbnails inside SharePoint requires three building blocks.

Add a new field named “ThumbnailLink” to the document library. It will store the URL of every preview image generated for a DWG file.

Generate and refresh thumbnails

We create the previews with the Drawings SDK from the Open Design Alliance. Make sure you download the release that matches the .NET Framework version you use; the compatibility matrix in this Stack Overflow thread helps.

Because drawings change frequently, the thumbnail must be regenerated whenever a file is updated. An Event Receiver handles that automation: it listens for changes, recreates the image, uploads it, and writes the new link to “ThumbnailLink” if none exists yet.

To display the stored image links, we rely on Client-Side Rendering, the same approach we use in the SharePoint image gallery tutorial. Edit the desired view of the document library and add your JavaScript file to the JS Link property.

SharePoint web part properties showing the JS Link field

Inside that script you simply replace the default link with an <img> tag that points to “ThumbnailLink”. Microsoft documents the pattern in this archived article.

Result

When all pieces are in place, the document library shows rich DWG previews and users can recognize the right drawing at a glance.

SharePoint document library displaying DWG thumbnails

Need help implementing DWG thumbnails in SharePoint? Leave a comment or send us an email and we will be happy to support you.

Related articles

SPFx 1.24: Testing today to help our customers tomorrow
EventBooking in Microsoft 365 Copilot: original product cards with a confirmed registration on the right and a follow-up question about the booked workshop on the left

SPFx 1.24: Testing today to help our customers tomorrow

We are exploring the SPFx 1.24 preview with our existing products. EventBooking in Copilot shows promising early results and gives us practical experience for future customer solutions.

Read more
Provisioning at enterprise scale: PnP templates,

Provisioning at enterprise scale: PnP templates, throttling and race conditions across thousands of libraries

Provision SharePoint at enterprise scale with PnP: handle 429 throttling, idempotency, and ETag-based race-condition protection.

Read more
Website Relaunch: Migrate WordPress to Astro with
Website Relaunch: Migrate WordPress to Astro with Custom Tools

Website Relaunch: Migrate WordPress to Astro with Custom Tools

How we successfully migrated from WordPress to Astro: Custom migration tools, GitHub integration, Azure hosting, and Content-as-Code workflow. Battle-tested solution for modern websites.

Read more

Questions about this topic?

We are happy to help you put this into practice in your environment.