htmlImgBase64¶
- emlib.img.htmlImgBase64(imgpath, width=None, maxwidth=None, margintop='14px', padding='10px', removeAlpha=False, scale=1.0)[source]¶
Read an image and return the data as base64 within an img html tag
- Parameters:
imgpath (
str
) – the path to the imagewidth (
Union
[int
,str
,None
]) – the width of the displayed image. Either a width in pixels or a str as passed to css (‘800px’, ‘100%’).maxwidth (
Union
[int
,str
,None
]) – similar to widthscale – if width is not given, a scale value can be used to display the image at a relative width
- Return type:
str
- Returns:
the generated html