Skip to content
SharePoint Development

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.

  • DWG
  • SharePoint
  • Thumbnail
  • Client-Side Rendering

Related articles

SharePoint Intranet Phone Directory with a Skills
SharePoint Intranet Phone Directory with a Skills Feature

SharePoint Intranet Phone Directory with a Skills Feature

Build SharePoint people and skills search with SPFx, Microsoft Graph, a skills catalog, and Microsoft 365 profile data.

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
Migrate SharePoint version history intelligently: Less

Migrate SharePoint version history intelligently: Less storage, same traceability

Use hash-based version deduplication to save SharePoint Online storage during a 25 TB migration and avoid Migration API pitfalls.

Read more

Questions about this topic?

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