Evotec

Project

PSWriteHTML

PSWriteHTML is an open-source PowerShell project with packages, release history, and working documentation.

Stars 995
Forks 114
Open issues 69
PowerShell Gallery downloads 7,436,513
Release v1.41.0
Language: PowerShell Updated: 2026-04-11

API Reference

Function

New-HTMLImage

Namespace PSWriteHTML

Creates IMG tag with image link or image bundled inline

Remarks

Creates IMG tag with image link or image bundled inline

Examples

Authored help example

EXAMPLE 1


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

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.

Syntax

New-HTMLImage [-AlternativeText <String>] [-Class <String>] [-DisableCache] [-Height <Object>] [-Inline] [-Source <String>] [-Target <String>] [-UrlLink <Uri>] [-Width <Object>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

AlternativeText String optionalposition: 2pipeline: False
Specifies an alternate text for the image, if the image for some reason cannot be displayed
Class String optionalposition: 3pipeline: False
Overwrites default CSS settings for links
DisableCache SwitchParameter optionalposition: namedpipeline: False
Height Object optionalposition: 6pipeline: False
Height of an image (optional)
Inline SwitchParameter optionalposition: namedpipeline: False
Inserts given Image URL/File directly into HTML
Source String optionalposition: 0pipeline: False
Link to an image or file path to an image
Target String optionalposition: 4pipeline: False
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: 1pipeline: False
Specifies the URL of the page the link goes to when user clicks an image
Width Object optionalposition: 5pipeline: False
Width of an image (optional)