html2ogimage - Convert HTML to an Image
Converts a HTML snippet to an image.
htmlstring
HTML to render as an image. You can use tailwind classes provided in a tw tag in your elements. The following font families are supported: Alegreya, Barlow, Inter, Lato, Montserrat, OpenSans, Oswald, Poppins, PTSans, Raleway, Roboto
Example:
<div>Hello</div>widthnumber
The image width.
Minimum: 1
Maximum: 10000
Example:
500heightnumber
The image height.
Minimum: 1
Maximum: 10000
Example:
500outputFormatstring
The desired output format
Possible values are: svg, png, jpg
Example:
pngdefaultFontstring
A default font that is injected at top level into your html. Can be overwritten by providing another font-family in a sub element.
Possible values are: Alegreya, Barlow, Inter, Lato, Montserrat, OpenSans, Oswald, Poppins, PTSans, Raleway, Roboto
Example:
OpenSans