Manifest

You must declare the "wallpaper" permission in the app manifest to use the wallpaper API. For example:

{
  "name": "My extension",
  ...
  "permissions": [
    "wallpaper"
  ],
  ...
}

Examples

For example, to set the wallpaper as the image at http://example.com/a_file.png, you can call chrome.wallpaper.setWallpaper this way:

chrome.wallpaper.setWallpaper(
    {
      'url': 'http://example.com/a_file.jpg',
      'layout': 'CENTER_CROPPED',
      'name': 'test_wallpaper'
    }, function() {});