How to Convert Custom Background Images for Teams 2.1

Tracking the Evolution of Custom Background Images for Teams Meetings

I’ve written about using custom background effects in Teams meetings since their introduction in early 2020, including how to fetch and use the Bing daily images as custom background inages for Teams meetings.

Recently, I’ve used the Teams 2.1 client as my daily driver. Microsoft expected that the new Teams client would become the default client in late September. The switchover is very close and the new client is in good shape. It’s as stable as its Electron-based predecessor and performs better, so using Teams 2.1 is a reasonable option for someone like me. The task of deploying the new client across a large enterprise will take some planning and coordination.

No Custom Background Images After Switch to Teams 2.1

As part of my personal move, I noticed that the custom background images I use for Teams meetings are unavailable in Teams 2.1. Some investigation revealed that Teams 2.1 uses a different folder to store custom images. Here are the folders used by the two clients.

  • Teams 1: C:\Users\userx\AppData\Roaming\Microsoft\Teams\Backgrounds\Uploads
  • Teams 2.1: C:\Users\userx\AppData\Local\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\Backgrounds\Uploads

Switching to Teams 2.1 doesn’t transfer custom background images to the new location, possibly because Microsoft uses a new naming scheme for the images. Instead of regular names like My favorite beach scene.jpg, Teams 2.1 uses names like 42b9a5ad-460e-46df-8c1b-f4d7c42dffc0.jpg. Each image exists in a high-resolution (at least 1920 x 1080 pixels) version and a lower-resolution thumbnail (220 x 158 pixels). The high-resolution version is the image that Teams loads as a meeting background. The thumbnails are displayed in the gallery of available background images.

Transferring Custom Background Images for Teams 2.1

Because of the naming scheme used by Teams 2.1, it’s not enough to simply copy custom background images from the Teams 1 folder because Teams 2.1 ignores any files that don’t follow its naming convention (with or without a thumbnail).

The obvious fix for the problem is to upload custom background images into the Teams 2.1 client. That’s acceptable when only a couple of files are involved. Things get boring thereafter, which is why I wrote a PowerShell script (downloadable from GitHub). The script:

  • Loads a Resize-Image function to resize images to the desired sizes (originally written by Christopher Walker and found in GitHub).
  • Defines the folders used by Teams 1 and Teams 2.1.
  • Finds JPG files in the Teams 1 folder. The script ignores any thumbnails and only processes high-resolution images.
  • Call the Resize-Image function to generate new high-resolution files sized at 1920 x 1080 and thumbnails. The file names follow the Teams 2.1 scheme.
  • Copy the generated files to the Teams 2.1 folder and remove them from Teams 1 folder.
  • Lists the JPG files now in the Teams 2.1 folder.

It’s not a particularly complex script, but it worked. The acid test is that I can select my custom background images from the gallery when in a meeting with the Teams 2.1 client (Figure 1).

Custom background images in the gallery of the Teams 2.1 client
Figure 1: Custom background images in the gallery of the Teams 2.1 client

Bumps in the Changeover

The changeover from Teams 1 to Teams 2.1 will reveal some flaws. The architecture and internal functions of the two clients are very different. Using a different folder to store custom background images is a very small indicator of the kind of change involved in the transition. I have no idea why Microsoft decided to switch folders as the Teams 1 folder seemed perfectly acceptable, but they did. Now you know how to transfer custom background images to the new location, the issue goes away.

I don’t see any reason why the same technique could not be used to distribute a set of organization images to workstations. If you can access the folder, you can copy custom background images to it and make those images available for Teams meetings.

Support the work of the Office 365 for IT Pros team by subscribing to the Office 365 for IT Pros eBook. Your support pays for the time we need to track, analyze, and document the changing world of Microsoft 365 and Office 365.

19 Replies to “How to Convert Custom Background Images for Teams 2.1”

  1. Hi Tony, Thinking of custom organizational-defined backgrounds: To provide them via the official way, you need an Advanced Communication add-on or the Teams Premium add-on.

    Is the “workaround” you described, to provide custom (organisational-defined)) backgrounds, in general not only a technical, but also license-compliant way without having subscribed to one of the two add-ons?

    Thank you!

    1. It’s perfectly compliant. You’re not using the advanced background image distribution functionality available in the TAC. All you’re using is basic Teams.

  2. Not sure if it’s just me, but line 133 in that script to move the images gives me the output of “C:\Local\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\Backgrounds\Uploads”, which is not the deisred location?

    1. What’s the issue?

      $TargetDirectory = $Env:appdata.Split(“\Roaming”)[0] + “\Local\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\Backgrounds\Uploads”
      dir $targetdirectory


      Mode LastWriteTime Length Name
      —- ————- —— —-
      -a— 28/09/2023 16:59 73078 42b9a5ad-460e-46df-8c1b-f4d7c42dffc0_thumb.jpg
      -a— 28/09/2023 16:59 3801837 42b9a5ad-460e-46df-8c1b-f4d7c42dffc0.jpg
      -a— 28/09/2023 16:59 77398 7f24caf1-f964-4c0a-9833-19dd07f7a4cb_thumb.jpg
      -a— 28/09/2023 16:59 4118914 7f24caf1-f964-4c0a-9833-19dd07f7a4cb.jpg
      -a— 28/09/2023 16:59 67513 7f3c3804-400f-4b94-b9ba-e31ca15dda96_thumb.jpg
      -a— 28/09/2023 16:59 3714101 7f3c3804-400f-4b94-b9ba-e31ca15dda96.jpg
      -a— 28/09/2023 16:59 78085 a8db19e1-51c3-4b8c-9e96-2b86ffc494a3_thumb.jpg
      -a— 28/09/2023 16:59 4070547 a8db19e1-51c3-4b8c-9e96-2b86ffc494a3.jpg
      -a— 28/09/2023 16:59 75121 aa41330b-fd40-4133-b729-3a95786b2903_thumb.jpg
      -a— 28/09/2023 16:59 4438818 aa41330b-fd40-4133-b729-3a95786b2903.jpg
      -a— 28/09/2023 16:59 86775 c1c0f882-c597-4e73-8c21-0b87ddc54423_thumb.jpg
      -a— 28/09/2023 16:59 4413953 c1c0f882-c597-4e73-8c21-0b87ddc54423.jpg
      -a— 28/09/2023 16:59 87623 c6d99794-0d66-4012-9849-0da4d2afcf6a_thumb.jpg
      -a— 28/09/2023 16:59 4586366 c6d99794-0d66-4012-9849-0da4d2afcf6a.jpg
      -a— 28/09/2023 16:59 71257 df2e4d5d-bb92-44e2-a3b3-78c545cfde1d_thumb.jpg
      -a— 28/09/2023 16:59 3424414 df2e4d5d-bb92-44e2-a3b3-78c545cfde1d.jpg
      -a— 28/09/2023 16:59 71414 e2278204-61ce-440f-ac98-2b1317eea339_thumb.jpg
      -a— 28/09/2023 16:59 3733730 e2278204-61ce-440f-ac98-2b1317eea339.jpg
      -a— 28/09/2023 22:43 31244 virginb747_thumb.jpg
      -a— 28/09/2023 22:40 3629089 virginb747.jpg

      1. PS C:\> $TargetDirectory = $Env:appdata.Split(“\Roaming”)[0] + “\Local\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\Backgrounds\Uploads”

        PS C:\> dir $TargetDirectory
        dir : Cannot find path ‘C:\Local\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\Backgrounds\Uploads’ because it does not exist.
        At line:1 char:1
        + dir $TargetDirectory
        + ~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo : ObjectNotFound: (C:\Local\Packag…grounds\Uploads:String) [Get-ChildItem], ItemNotFoundException
        + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand

      2. Did you run the complete script to compute the value of the $TargerDirectory variable? It takes $ENV:AppData and adds the “\Local\Packages…” string to compose the directory. $ENV:AppData must be pointing to c:\users\userid\appdata\roaming … no?

  3. Welp, maybe it was just me then, because I just rebooted and then copied the code and ran it again, and it ran fine 🙁 sorry about all that 🙂

    1. No worries. Your comments prompted me to include some code to check for the existence of the folders and create the V2.1 target if it wasn’t already present, so some good came from the comversation.

  4. I saw the same issue as Tim Brown. The “.Split(“\Roaming”)” doesn’t seem to be doing what is intended on my machine (Win 11/PSVersion: 5.1.22621.1778)

    PS C:\> $Env:appdata

    PS C:\> $Env:appdata.Split(“\Roaming”)[0]

    PS C:\> $Env:appdata.Split(“\Roaming”)

    I worked around it by changing that bit to:

    ($Env:appdata -Split(“\\Roaming”))[0]

    1. Hmmm… I use PowerShell 7, so maybe this is one of the oddities that sometimes afflict PowerShell 5 vs 7. Your method works on both, so I have updated the script in GitHub. Thanks for helping.

  5. I just updated my teams background images deployment script to support new teams.
    I store all the custom backgrounds in a sharepoint site and download them via the sharepoint api to each users computer using intune script.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.