# New-HTMLImage

Creates IMG tag with image link or image bundled inline.

Project

PSWriteHTML

Generate HTML reports, dashboards, and emails from PowerShell without writing HTML, CSS, or JavaScript.

[View on GitHub](https://github.com/EvotecIT/PSWriteHTML) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteHTML/releases/tag/v1.41.0) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteHTML/1.40.0)

Stars **1,025**

Forks **114**

Open issues 

PowerShell Gallery downloads **7,576,901**

Release **v1.45.0**

Language: PowerShell Updated: 2026-11-19

Command 

**Module**

`PSWriteHTML`

Creates IMG tag with image link or image bundled inline

## Syntax

```
New-HTMLImage
[[-AlternativeText] <String>]
[[-Class] <String>]
[-DisableCache]
[[-Height] <Object>]
[-Inline]
[[-Source] <String>]
[[-Target] <String>]
[[-UrlLink] <Uri>]
[[-Width] <Object>]
[<CommonParameters>]
```

[#](#method-new-htmlimage-string-string-switchparameter-object-switchparameter-string-string-uri-object)

Parameter set: `All Parameter Sets`

## Examples

### Example 1

```powershell
New-HTMLImage -Source 'https://evotec.pl/image.png' -UrlLink 'https://evotec.pl/' -AlternativeText 'My other text' -Class 'otehr' -Width '100%'
```

## Parameters

**-AlternativeText String optionalposition: 2**

Specifies an alternate text for the image, if the image for some reason cannot be displayed

**-Class String optionalposition: 3**

Overwrites default CSS settings for links

**-DisableCache SwitchParameter optional**

**-Height Object optionalposition: 6**

Height of an image (optional)

**-Inline SwitchParameter optional**

Inserts given Image URL/File directly into HTML

**-Source String optionalposition: 0**

Link to an image or file path to an image

**-Target String optionalposition: 4**

The target attribute specifies where to open the linked document. - _blank Opens the linked document in a new window or tab - _self Opens the linked document in the same frame as it was clicked (this is default) - _parent Opens the linked document in the parent frame - _top Opens the linked document in the full body of the window Additionally framename can be given. Default is _blank

**-UrlLink Uri optionalposition: 1**

Specifies the URL of the page the link goes to when user clicks an image

**-Width Object optionalposition: 5**

Width of an image (optional)

## Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see [about_CommonParameters](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:3715A1537FC007FA2C7741D0B9F2CA1D8628BFDE751747A61B9D150C4E66D0B5 -->
