800,000+ WordPress sites are already using MetaSlider!

MetaSlider Documentation

Let’s Connect


Use this filter to modify or add attributes to each slide image tag.

{type} can be flex, coin, responsive or nivo.



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


(array) (required) Slide data


(int) (required) Slideshow ID


Add rel attribute

This example will add a ‘rel’ attribute of ‘lightbox’ to each slide in the slideshow. Eg, <img width=’x’ height=’x’ src=’x’ rel=’lightbox’ />

function metaslider_add_rel_attribute_to_images($attributes, $slide, $slider_id) {
        $attributes['rel'] = 'lightbox';
	return $attributes;
add_filter('metaslider_flex_slider_image_attributes', 'metaslider_add_rel_attribute_to_images', 10, 3);
Still stuck? How can we help?
Last Updated on January 01, 1970

Start Using Your Slider Today!

Create and Publish Forms in Minutes… What are you waiting for?