How to print a thumbnail with specific width and height

Permalink
I'm trying to print an image thumbnail with specific width and height

for example:
<img src="source.jpg" width="100" height="100" />


Right now my code looks like this
<a href="<?php echo $url ?>">
   <?php
      $img = Core::make('html/image', array($thumbnail));
      $tag = $img->getTag();
      print $tag;
   ?>
</a>


What should I add to the code to add width and height?

 
mnakalay replied on at Permalink Reply
mnakalay
This code already takes care of that. It will automatically add width and height.

But as an FYI, I believe the code would be
$tag->width((string) $img->getAttribute('width'));
$tag->height((string) $img->getAttribute('height'));