Show spinner while image is loading

I have a page with a background image. On first load, the image takes time to fully load. How can I show a spinner while the image is loading? I tried using ngIf with a boolean that changed in ionViewDidLoad, but that does not work because the image is not fully loaded even if the page DOM is loaded.

One super simple way could be to display the spinner in a layer behind the image that gets loaded.

1 Like