Using Bing Daily Images as your MS Teams Meetings Background
Setting a virtual background allows you to eliminate any distractions that may occur in your actual environment. However, it’s important to ensure you pick an image that retains professionalism and doesn’t divert attention.
The Microsoft Bing Search Engine provides a scenic picture each day on bing.com. These images are attractive, professional and with the daily picture, they offer an element of variance. With the Bing API, these images can be downloaded for your use and can be used as a custom background image in your Microsoft Teams calls.
How to set a background image in Teams
Background images are a new addition to Teams’ meetings and are accessible from within a meeting. To access the background images within a meeting, click the […] in the menu bar and then select Apply background effects. You can then select from a set of images:
- None (blank).
- Blur (same effect as background blurring)
- One of the sets of curated images chosen by Microsoft.
- Custom images uploaded by you.
Currently, there is no direct explanation on how you can upload your backgrounds, although Microsoft has suggested that this option will be made available soon.
To set your custom background, you’ll need to navigate the file system. On Window's computers place the image in %AppData%\Microsoft\Teams\Backgrounds\Uploads folder. On Macs, place the image in /users//Library/Application Support/Microsoft/Teams/Backgrounds/Uploads folder.
To use the daily Bing picture as a background image you need to save the Bing picture in the uploads folder of Teams’ backgrounds.
How to download the daily Bing image
While the Bing homepage offers the option to download the current image, this is a manual option that only allows you to access the picture of that day. To get around this and attain additional images you need to access the Photo of the day information.
Photo of the day information can be accessed in several formats. For this tutorial, we’ve applied Martina Grom’s method.
The photo data can be downloaded in XML, RSS and JSON formats with this link We can use the format parameter with the values XML, RSS or js for JSON. For this method we use JSON.
The IDX parameter determines the day: 0 is the current day, 1 is the previous day, etc. This goes back for a maximum of 7 days (any number larger than 7 will not make a difference and you will always get the 7 days old picture).
The n parameter defines how many pictures you want to load. Typically, the n parameter equals 1 and will lead to the latest picture (of today) only. Finally, MKT defines the culture you want to get, like en-US, de-DE, etc.
When you execute this HTTP request in JSON format in a browser, you get back analogous information about the daily Bing image as follows:
{ "images":[ {"startdate":"20200507", "fullstartdate":"202005070700", "enddate":"20200508", "url":"/th?id=OHR.WildflowerWeek_EN-US0188713175_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp", ... } ], "tooltips": {...} }
In this example with n=1, there´s only one picture included. You can run the HTTP request in the browser to see the current result quickly.
Use the PowerShell script GetDailyBingPicture.ps1
To automate that with PowerShell, we use The Invoke-WebRequest method in a script file GetDailyBingPicture.ps1.
$uri = "https://www.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1&mkt=en-US" $response = Invoke-WebRequest -Method Get -Uri $uri
Analyze the data of the Bing image(s)
Using the above script, we will decode the result to access the picture and create a filename that is more usable. The $response contains a Content object (as we have seen above). We are interested in that data. The $response production looks as it is below.
StatusCode : 200 StatusDescription : OK Content : {"images":[{"startdate":"20200507","fullstartdate":"202005070700","enddate":"20200508","url":"/th?id=OHR.Wildflow erWeek_EN-US0188713175_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp","urlbase":"/th?id... RawContent : HTTP/1.1 200 OK ...
Load the daily Bing image
As the second part of the script, we convert the JSON data of Content to access the key and value pairs. Then, using the URL to download the picture and the date and the title of the image to generate a friendly filename including the date. Finally, we load the image and save it to the Teams/Upload folder (%APPDATA%\Microsoft\Teams\Backgrounds\Uploads).
If you don’t wish to have multiple files within your Teams uploads folder, simply use the same file name for each image and overwrite the daily picture every day automatically.
# Extract the image content $body = ConvertFrom-Json -InputObject $response.Content $fileurl = "https://www.bing.com/"+$body.images[0].url $filename = $body.images[0].startdate + "-"+$body.images[0].title.Replace(" ","-").Replace("?","") + ".jpg" # Download the picture to %APPDATA%\Microsoft\Teams\Backgrounds\Uploads $filepath = $env:APPDATA + "\Microsoft\Teams\Backgrounds\Uploads\" + $filename Invoke-WebRequest -Method Get -Uri $fileurl -OutFile $filepath
The daily Bing picture is downloaded to the Teams/Upload folder with a nicely formatted and safe filename with the date and the picture title. Like usual file settings, if the file name already exists, it will be overwritten.
Automate
To automate the daily downloading, open the Local Group Policy Editor (GPO) and navigate to User configuration - Windows Settings - Scripts (Logon/Logoff). Click Logon and in the Logon Properties box, click on the PowerShell Scripts tab. Open Show Files. This opens the Explorer with the file path C:\WINDOWS\System32\GroupPolicy\User\Scripts\Logon. Copy the script GetDailyBingPicture.ps1 in that folder. Then, click Add... and add the file GetDailyBingPicture.ps1. Then click OK.
During this process, set the PowerShell settings "Allow local scripts and remote signed scripts" to RemoteSigned (run Set-ExecutionPolicy RemoteSigned), so that the script is allowed to run.
After the Logon configuration in the GPO is done, log off and log in again. Then, check the teams Upload folder %APPDATA%\Microsoft\Teams\Backgrounds\Uploads.
Once these steps are completed successfully you should be able to see the daily Bing picture in the upload folder.
Use the daily image
To apply the Bing image as a Teams background, open the […] in the menu bar when in a meeting and then select Apply background effects. Select the preferred Bing picture that´s automatically downloaded to your computer.
Summary
With this method, you can easily download Bing’s beautiful pictures for your Team calls and make remote work as easy and professional as it would be in an office.
Source: Grom, M. (2020). Get the daily Bing picture as background in your Teams meetings automatically. Available: https://blog.atwork.at/post/Use-the-Daily-Bing-picture-in-Teams-calls.
If you’re interested in how to optimize your Teams experience, we can help. Our social media and blog channels contain the latest information and tips about Microsoft Applications
If you’re looking to transition your organisation across to Teams, we can make the switch as straightforward as possible. Our expertise ensures that we will be there to support your company through any teething problems once it's installed. If you think Microsoft Teams might be the right tool for you while your team works from home then get in contact with us.
To keep up to date with our latest news follow us on social media – Instagram, LinkedIn, Facebook