user3384514 user3384514 - 5 months ago 37
HTML Question

{{HTML::image}} set width and height in Laravel

Sorry for the stupid question, but I looked everywhere in the doc. If I want to set size, height and width of an image with

HTML::image
, how can I do it?
I tried with:

{{ HTML::image('path', array('width' => 70 , 'height' => 70)); }}


But it doesn't seem to work.

Answer

It should work with

{{ HTML::image('path', 'alt', array( 'width' => 70, 'height' => 70 )) }}

The alt text comes before the attributes array.

Comments