Closed matt555 closed 3 months ago
@EvotecIT this one looks pretty simple. There's a light curveball here in that SVG files can also be inline as elements within the page.
This has some trade-offs: it spaces a little differently than within an tag if it's inline (not as great), and it can include JavaScript and align to CSS classes defined elsewhere in the HTML if it's actually "inline".
I think a [switch] might be required to make this ideal.
Feel free to assign it to me and I'll try to run with it.
When supplying
New-HTMLImage -Inline
with an SVG image (file or URI) it creates an invalid mime type (at least in modern browsers, unsure of the history there).In short:
svg
should instead besvg+xml
Current html output:
Working html:
Fix: Seems like an easy fix to add the below
elseif
to https://github.com/EvotecIT/PSWriteHTML/blob/master/Private/Convert-ImageToBinary.ps1#L9-L9Matt