Image size fetched from database

Hello All,

i am fetching two images from database and displaying them in a box of height 370px. But the problem is the image is not getting fit into the box, only a part of it is coming there.
is it possible to give a dimension to the image t the time of fetch.

$profile_picA = ‘user/’.$u.‘/’.$avatar1.‘’;
$profile_picB = ‘user/’.$u.‘/’.$avatar2.‘’;


Have you tried setting the image size in the img tag?

Also, if you’re only going to be showing the images at 370px in height, then you may want to consider cropping them before saving them on the server. This will both save disk space and speed up page load times (due to the loading of smaller image files).

I am using
#bigc{width:70%; border:1px solid silver; margin:auto; height:370px; margin-top:3%; overflow:hidden; background-size:cover;}
#bigc>img{width:100%; height:100%;}

I can’t see anything wrong with that. Are you accidentally overwriting the values via attributes? If not, then could you post a screen shot to show how the image isn’t fitting into your box?