In most modern programming languages it is possible to add an image to your page and then resize it to fit a container using max-height attributes in either the surrounding div or the image tag. In cakephp this is not the case. When I use the max-height attributes the image remains the same size and is then cropped. It doesn't even have the dimensions of the max-height attribute. It has some random pixel amount. Here is a piece of my code. I've tried all different combinations of css. Does anyone know how to do display an image in cakephp that will fit a container?
<div style="max-height:29px;">
<?php echo $this->Html->image('/webroot/files/Users/photo/' . $user->photo, ['alt' => 'picOfme', 'max-height'=>'100%']);
?>
</div>