Found resolution, we can pass the data type (image) and format(png;base64) to the url property.
const weatherSymbol = {
type: 'picture-marker',
url: "data:image/png;base64," + base64ImageString,
contentType: 'image/png',
width: '32px',
height: '32px',
xoffset: -10,
yoffset: 24
};