800,000+ WordPress sites are already using MetaSlider!

Metaslider_{type}_slider_image_attributes

This part of the MetaSlider API allows you to modify the code used to output each image in a slideshow, changing the rel, width, height, and other details.

You can use this filter to modify or add attributes to each slide image tag.

The {type} can be any of the four MetaSlider libraries: flex, coin, responsive or nivo.


Parameters

$attributes

(array) (required) Default image attributes (eg width, height, src).

$slide

(array) (required) Slide data

$slider_id

(int) (required) Slideshow ID


Example

This example will add a “rel” attribute of “lightbox” to each slide in the slideshow. For example: <img width=”x” height=”x” src=”x” rel=”lightbox” />