# add_background_image { #powerbpy.add_background_image }

`add_background_image`



## Functions

| Name | Description |
| --- | --- |
| [add_background_img](#powerbpy.add_background_image.add_background_img) | Add a background image to a dashboard page |

### add_background_img { #powerbpy.add_background_image.add_background_img }

```python
add_background_image.add_background_img(
    dashboard_path,
    page_id,
    img_path,
    alpha=100,
    scaling_method='Fit',
)
```

Add a background image to a dashboard page

#### Parameters {.doc-section .doc-section-parameters}

| Name           | Type   | Description                                                                                                                                                                                                                                                                                                                                       | Default    |
|----------------|--------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------|
| dashboard_path | str    | The path where the dashboard files are stored. (This is the top level directory containing the .pbip file and Report and SemanticModel folders).                                                                                                                                                                                                  | _required_ |
| page_id        | str    | The unique id for the page you want to add the chart to. If you used this package's functions it will be in the format page1, page2, page3, page4, etc. If you manually created the page it will be a randomly generated UUID. To find a page's page id, consult the report > definition> pages > page.json file and look in the page order list. | _required_ |
| img_path       | str    | The path to the image you want to add. (Can be a relative path because the image is copied to the report folder). Allowed image types are whatever PBI allows manually, so probably at least jpeg and png                                                                                                                                         | _required_ |
| alpha          | int    | The transparency of the background image. Must be a whole integer between 1 and 100.                                                                                                                                                                                                                                                              | `100`      |
| scaling_method | str    | The method used to scale the image available options include ["Fit", ]                                                                                                                                                                                                                                                                            | `'Fit'`    |