I\'m writing a module that takes article data from json and shows a large image over the article text, a hero module as they say.
I\'ve got the data and have set it
There is a native event for images called onerror that lets perform an action if the image cannot be loaded.
onerror
//in your component addDefaultSrc(ev){ ev.target.src = 'some default image url' }