Images not loading in ios 18 wkwebview

So I have an ios app using wkwebview - ionic framework, my images (not local and hosted) can be seen in ios 17 in my app but not in ios 18. Is there some changes in wkwebview for this particular thing or am I missing something else?

Hi, I had the exact same issue as you. I had a bunch of errors indicating issues around the BrowserEngineKit which led me down the wrong rabbit hole.

There appears to have been a change in iOS 18 which caps the amount of image processing that can happen. My SVG was of a higher res image and was crashing the app.

I added in the following code to my HTML file to allow a smaller file size image to be used for iOS 18.

*ngIf="this.glob.osVersionNumber >= 18"
*ngIf="this.glob.osVersionNumber < 18"

In order to fetch the os version of a device you can use the capacitor plugin Device. (I imagine there are several methods for getting this)

Hope this helps!

Images not loading in ios 18 wkwebview
 
 
Q