I have an image on my component, that is showing a MJPEG.
<img *ngIf="imageUrl" src="{{imageUrl}}" />
When I navigate to another component, the request to the MJPEG is not cancelled. It is still loading the images.
I have already tried to set the imageUrl in ngOnDestroy to null, or to a static image. Also I tried, to set the html element directly
this.image.nativeElement.src = null;
None of that is working. The download is still running.

In you case
Obervablemust help. Request the image by url usingHttpClientand then assign it to your<img>. Preserve the subscribtion and you will be able usubscribe it any time, which will cancel the request.