I have several png images sitting in my project which will be dynamically selected so I need a function in js that will take a relative path to those png files and return a base64 string something like this "url(data:image/png;base64,iVBORw0KGgoAA)
My file paths are something like this "/Content/Images/OK-x-small.png" So I need base64 representation of OK-x-small.png image please.
How can I do this?