Base64 is a binary-to-text encoding scheme that is commonly used to represent binary data, such as images. To convert image into base64 image format that can be use in CSS background property or IMG source attribute.
CSS Codediv {IMG Code
background-image:url('data:image/png;base64ImageCode');
}
<img src='data:image/png;base64ImageCode' />