You can use onerror.bind=“getPlaceholder” on the html image, where getPlaceholder is a function on your component.
In my tests (Aurelia 1.3.1), the getPlaceholder method is ran within a closure where “this” refers to the image object, so from here simply set this.src = “[Url of placeholder image]”.
You can add dynamic fallback sources by adding a data attribute to the html image too, eg: add data-backupImage=“createBackupImage(viewModelObject)” as an attr on the image element, then refer to the attribute value in the getPlaceholder method by accessing: this.dataset.backupImage.
It’s 2021, but for someone that finds themselves here I hope this helps!