I use UniWebView 3 plugin for Unity for display local .html files. This plugin use WKWebView which does not load local images in .html on iOS device. But .css and .js files succesfully loads (which are in header). In Unity editor images are show correctly (macOS).
Image tag is:
<img src="highlights-14.png" alt="image description" />
highlights-14.png in the same folder with index.html.
Also I tried tags looks like this:
<img src=«/highlights-14.png" alt="image description" />
<img src=«./highlights-14.png" alt="image description" />
<img src=«../highlights-14.png" alt="image description" />
// With moving image into associated folder
<img src=«images/highlights-14.png" alt="image description" />
<img src=«/images/highlights-14.png" alt="image description" />
<img src=«./images/highlights-14.png" alt="image description" />
I tried to use readAccessURL (loadFileURL:allowingReadAccessToURL: in WKWebView) in Load method. If i have a URL (path to site) looks like this:
file:///var/containers/Bundle/Application/.../Data/Raw/Products/Research.html
Then I will have next readAccessURL:
file:///var/containers/Bundle/Application/.../Data/Raw/Products/
Also I tried this string for readAcessURL:
file:///var/containers/Bundle/Application/.../Data/Raw/Products
And this:
file:///var/containers/Bundle/Application/.../Data/Raw/
And some other…
I tried to add «Allow Arbitrary Loads in Web Content» key with «YES» value to info.plist (under App Transport Security Settings).
WKWebView still does not load any image. Thank you for any suggestions.