2amigos / yii2-gallery-widget

BlueImp Gallery Widget for Yii2
http://yiiwheels.com
Other
60 stars 37 forks source link

Q: Add class to IMG #17

Closed jesusvallez closed 7 years ago

jesusvallez commented 7 years ago

I want to add 'class' => 'img-responsive' to my image to make responsive my 'src' like:

<div id="w1">
   <a class="gallery-item" href="http://a.com/b.jpg" title="text">
      <img src="http://a.com/b.jpg" class="img-responsive">
   </a>
</div>

if i add'options' => array('class' => 'img-responsive')

i get this:

<div id="w1">
   <a class="gallery-item" href="http://a.com/b.jpg" title="text" class="img-responsive">
      <img src="http://a.com/b.jpg">
   </a>
</div>

how can i write my personal class in an img tag?

tonydspaniard commented 7 years ago

Use «imageOptions» of the image item

jesusvallez commented 7 years ago

Works. Thanks!