# EmailHtmlImageDocument

Bounded, network-free DOM view used to discover and rewrite image sources in email HTML.

Class 

`OfficeIMO.Email`

**Namespace**

`OfficeIMO.Email`

**Assembly**

`OfficeIMO.Email.Html`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[EmailHtmlImageDocument.cs:58](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Email.Html/EmailHtmlImageDocument.cs#L58)

**Modifiers**

sealed

Bounded, network-free DOM view used to discover and rewrite image sources in email HTML.

## Inheritance

- object
- EmailHtmlImageDocument

## Remarks

Parsing and HTML recovery are owned by OfficeIMO.Html. This type never resolves or downloads a resource; callers remain responsible for authorizing local files and remote network access.

## Usage

Explore 1 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 1

- Method [EmailHtmlImageDocument.Parse](/api/email-html/officeimo-email-emailhtmlimagedocument/#method-parse-string)

Filter members 

Show inherited

## Methods

`public static EmailHtmlImageDocument Parse(string html)` [#](#method-parse-string)

[EmailHtmlImageDocument.cs:58](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Email.Html/EmailHtmlImageDocument.cs#L58)

Parses an HTML fragment or document under the shared OfficeIMO limits without performing network access.

Parameters

**html string required**

HTML fragment or document to inspect.

Returns

`EmailHtmlImageDocument`

`public void SetImageSource(int imageIndex, string source)` [#](#method-setimagesource-int32-string)

[EmailHtmlImageDocument.cs:90](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Email.Html/EmailHtmlImageDocument.cs#L90)

Rewrites one image source selected by its stable document-order index.

Parameters

**imageIndex int required**

Index from [EmailHtmlImageReference.Index](/api/email-html/officeimo-email-emailhtmlimagereference/).

**source string required**

Replacement source, such as a cid: reference.

`public string ToHtml()` [#](#method-tohtml)

[EmailHtmlImageDocument.cs:98](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Email.Html/EmailHtmlImageDocument.cs#L98)

Serializes the current DOM while retaining fragment versus document shape.

Returns

`string`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public IReadOnlyList<EmailHtmlImageReference> Images { get; }` [#](#property-images)

[EmailHtmlImageDocument.cs:51](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Email.Html/EmailHtmlImageDocument.cs#L51)

Images with explicit src attributes in document order.

<!-- PowerForge markdown artifact sha256:5A832CF798A6333B6AB5D795D2713F7747D5A6345AF91AD8A9C83CACD8411DCA -->
