I have an image stored in a database that I'm trying to stretch to width and height of div, I can get the width to 100% but can't get the height to do the same.
I'd like to use background cover but that wont work as I'm not getting my image via background: url() in css
The code has been tried with different variations but currently is:
<div id="postimave">
<img src="data:image/jpeg;base64,<?php echo base64_encode($thumb) ?>" />
</div>
CSS:
img {
width:100%;
height:100%;
background-size:cover;
}