Jump to content

Local Image in a Local HTML File not Loading on iOS

Recommended Posts



I have an issue with loading a local image in a local HTML file on iOS. On Android it loads correctly. 

Here is the code I use to get the file including its path:


FileName:= 'Image.jpg';
FileName:= TPath.Combine(TPath.GetDocumentsPath, FileName);

I checked and the file exists. The image in the local HTML file is assigned as:


<img alt="Nov" src="file://the filename above">


I also checked with starting the source with "file:///". It STILL doesn't work on iOS but does on Android.


Any ideas?

Share this post

Link to post



Has anyone faced a similar issue?

Edited by MikeMon

Share this post

Link to post

I found a solution by embedding the image as a base64 encoded string and it's working fine on iOS.

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now