'remove warning preload images with link tag (Angular)

I got the following warning on the console when I try to add <link rel="preload" as="image" href="path"> into the <head>.

Path was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally

Any ideas on how I can hide the warning message, please?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source