I'm a newbie on Angular. I show an image returned by Web API.
So the imageURL
likes:
localhost/get-image/?target=content&sizetype=348x194&id=129
And I just bind it to img src.
<img [src]="imageURL"/>
The img
shows image exactly what I want.
But I search around how to load an image from API in Angular, the major result is using Blob
and no one does like what I'm doing.
Likes these questions.
Load image from api url into angular 5 component
Getting Image from API in Angular 4?
How to get image from rest api using HttpClient in angular 4
and a lot of questions about how to use Blob
I tried using Blob
but I don't see the difference.
So I wonder why and when using Blob
?
Sorry if this question is so basic.