CSS background image from database in ionic

In my ionic project, i want to set a background image of

. image from the database.
I used now like this
<img src="data:image/png;base64,{{slide.offerImage}}">

But I want to use it like this

<div style="background-image: url("")"></div>

I tried this

 <div style="background-image: url("data:image/png;base64,{{slide.offerImage}}")"></div>

but didn’t work.
help, please.

Your image is png or jpg?

Try this:

<div [ngStyle]="{ 'background-image': 'url(data:image/png;base64,' + slide.offerImage + ')'}">