I have a card component which has a structure for an image like this. One image can't be loaded because of (HTTP Status: 403). So I want to replace it with a default one. So I looked it up and learn that I can use @error.
<div class="card-thumbnail">
<img
:src="cardImage"
alt=""
@error="$event.target.src = '~/assets/images/error.jpeg'"
/>
</div>
However this code gives me error that "error.jpeg" can not be found. My folder structure is correct because without @error and a src like this:
src="~/assets/images/error.jpeg"
I can actually see my error.jpeg. So what I am doing wrong here ?