
## LoadOptions.base_uri property

Gets or sets the string that will be used to resolve relative URIs found in the document into absolute URIs when required.
Can be ``None`` or empty string. Default is ``None``.



```python
@property
def base_uri(self) -> str:
    ...

@base_uri.setter
def base_uri(self, value: str):
    ...

```

### Remarks

This property is used to resolve relative URIs into absolute in the following cases:


1. When loading an HTML document from a stream and the document contains images with
   relative URIs and does not have a base URI specified in the BASE HTML element.
   
1. When saving a document to PDF and other formats, to retrieve images linked using relative URIs
   so the images can be saved into the output document.
   



### Examples

Shows how to open an HTML document with images from a stream using a base URI.

```python
with system_helper.io.File.open_read(MY_DIR + 'Document.html') as stream:
    # Pass the URI of the base folder while loading it
    # so that any images with relative URIs in the HTML document can be found.
    load_options = aw.loading.LoadOptions()
    load_options.base_uri = IMAGE_DIR
    doc = aw.Document(stream=stream, load_options=load_options)
    # Verify that the first shape of the document contains a valid image.
    shape = doc.get_child(aw.NodeType.SHAPE, 0, True).as_shape()
    self.assertTrue(shape.is_image)
    self.assertIsNotNone(shape.image_data.image_bytes)
    self.assertAlmostEqual(32, aw.ConvertUtil.point_to_pixel(points=shape.width), delta=0.01)
    self.assertAlmostEqual(32, aw.ConvertUtil.point_to_pixel(points=shape.height), delta=0.01)
```

### See Also

* module [aspose.words.loading](../../)
* class [LoadOptions](../)

