Width/Height of Image in the Testimonial Block

Permalink 1 user found helpful
Hey all,

I was building a custom template for the Testimonial Block for a project in 5.7. The image outputs the width and height attributes - which is undesireable as my site is responsive (so I have a fixed height and the image is stretched).

I can see this in the controller, but it's Greek to me - anyway to remove the width/height attributes on this image?

$image = false;
        if ($this->fID) {
            $f = \File::getByID($this->fID);
            if (is_object($f)) {
                $image = Core::make('html/image', array($f, false))->getTag();
                $image->alt($this->name);
                $this->set('image', $image);
            }

juddc
 
juddc replied on at Permalink Reply
juddc
Nevermind - took a shot in the dark and added
$image->height();
and that seemed to work.