Don’t interact with the DOM directly in Angular apps. Instead, use property binding:
this.photo = "data:image/jpeg;base64," + imageData;
<img [src]="photo">
With this approach, you just have to (re)acquire the data URL as a property of any other page and it will display as you expect.