How to refer a local image file from UIWebView's HTML on iPhone?

后端 未结 4 586
面向向阳花
面向向阳花 2021-01-21 16:16

I would like to use temp.jpg\" /> in my UIWebView\'s HTML.
How can I refer to a local file named

4条回答
  •  情话喂你
    2021-01-21 17:06

    I was searching a lot for a solution and found the following which
    in my case working fine, I have a local HTML string and a local image I convert the image into base 64

    you may use this website to convert image to base64 encoding

    Converter

    and rewrite the HTML string to have the base64 image in the image tag like the following

        Red dot
    

    for Testing the result tye the following Online HTML editor

    W3School

    hope it will help for others or maybe get a better solution, best of luck

提交回复
热议问题