COMMENT
Bing Wallpaper shortcut by Mr. Jelly (ver 1.6)
This shortcut downloads the latest Bing wallpaper and sets it on your lock screen and home screen. For iPhones it downloads Bing's context-aware portrait crop (unfortunately limited by Bing to 1080p). For iPads it uses the unaltered landscape image (usually 4k or more). For older iPhones it downscales the image due to wallpaper size limits. And a notification tells you the subject and the author of the photo (just delete the last block if you don't like it). You can change Bing region and get more local images (use “en-us”, “de-de” etc. for local or “en-xl” for international version). I suggest running this shortcut with automation each day at a desired time.
Change log:
1.6 Refactor, added saving to Photos
1.5 Support for new iOS16 lockscreen, set homescreen blur on.
1.4 Changed source back to one from ver. 1.2 with settings from ver. 1.3 for best results, set default region to International.
1.3 Changed the source for higher resolution images, added landscape orientation for iPads, added notification with subject and author.
1.2 Added compatibility code for iPhone XR/11.
1.1 Switched to portrait image, improved readability, added compatibility code for iPhone 6s/7s/8/SE2 and SE.
1.0 Initial version.
COMMENT
Enable/disable wallpaper description and copyright information notification in the following Text action. Write “enabled” to turn notification on, anything else to turn it off.
TEXT
enabled

Text
COMMENT
Enable/disable saving of wallpaper image to Photos in the following Text action. Write “enabled” to turn saving on, anything else to turn it off. The image will be saved to “Bing Wallpapers” album. It will be created if it doesn’t already exist.
TEXT
disabled

Text
COMMENT
Set Bing Wallpaper locale in the following Text action. Use standard code like "en-us" for your language/country or "en-xl" for the international version. You can try any code you want, but as far as I know only a few listed here have different daily picture. If your selected country doesn't have different pictures or you enter an invalid code, Bing will use the international version.
Countries with specific daily picture:
Brazil (pt-br)
Canada (en-ca)
China (zh-cn)
France (fr-fr)
Germany (de-de)
India (en-in)
Italy (it-it)
Japan (ja-jp)
Spain (es-es)
International (en-xl)
TEXT
en-xl

Text
URL
https://www.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1&mkt=
Locale

URL
NETWORK
Get contents of
Bing wallpaper archive URL
Options Under Construction

Contents of URL
SCRIPTING
Get
Value
for
images
in
List of wallpapers

Dictionary Value
SCRIPTING
Get
Value
for
urlbase
in
Latest wallpaper

Dictionary Value
SCRIPTING
Get
Value
for
copyright
in
Latest wallpaper

Dictionary Value
SCRIPTING
Get the
Screen Height

Device Name
SCRIPTING
Get the
Screen Width

Device Name
SCRIPTING
Get the
Device Model

Device Name
SCRIPTING
If
Model zariadenia
is
iPhone
COMMENT
Portrait wallpaper for iPhone
URL
www.bing.com
Wallpaper base URL
_1080x1920.jpg

URL
NETWORK
Get contents of
Context-aware portrait format wallpaper URL
Options Under Construction

Contents of URL
SCRIPTING
If
Screen height in points
is greater than
896
COMMENT
Models with 1080p resolution and higher don’t need resizing
VARIABLES
Set variable
Wallpaper
to
Context-aware portrait format wallpaper
SCRIPTING
Otherwise
COMMENT
Models with 828p resolution and lower need resizing
MATHS
Screen height in points
×
2
Options Under Construction

Calculation Result
MEDIA
Resize
Context-aware portrait format wallpaper
to
Auto Width
x
Screen height in pixels

Resized Image
VARIABLES
Set variable
Wallpaper
to
Downscaled portrait wallpaper
SCRIPTING
End If

If Result
SCRIPTING
Otherwise
COMMENT
Landscape wallpaper for iPad
URL
www.bing.com
Wallpaper base URL
_UHD.jpg

URL
NETWORK
Get contents of
Full resolution landscape format wallpaper URL
Options Under Construction

Contents of URL
VARIABLES
Set variable
Wallpaper
to
Full resolution wallpaper
SCRIPTING
End If

If Result
COMMENT
Blur can be toggled on/off in the details of the following Set Wallpaper action.
The Set Wallpaper action should create a new photos lockscreen if it doesn’t exist. But after that if you delete the photos lockscreen, it won’t create a new one. So if for this or for some other reason it can’t create or select a photos lockscreen, create a new photos lockscreen and select it here.
MISSING
wallpaper.set Under Construction
SCRIPTING
If
Notification
is
enabled
NOTIFICATIONS
Show notification
Latest wallpaper
Options Under Construction
SCRIPTING
Otherwise
SCRIPTING
End If

If Result
SCRIPTING
If
Save to Photos
is
enabled
MISSING
photos.createalbum Under Construction
SCRIPTING
Otherwise
SCRIPTING
End If

If Result