Title: SrcSet group&#039;s attribute scope
Last modified: August 30, 2016

---

# SrcSet group's attribute scope

 *  [spinaker](https://wordpress.org/support/users/spinaker/)
 * (@spinaker)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/srcset-groups-attribute-scope/)
 * Could SrcSet group’s attribute be applied to images utilized by other plugins,
   like Metaslider for example?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Contributor [Eric Holmes](https://wordpress.org/support/users/ew_holmes/)
 * (@ew_holmes)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/srcset-groups-attribute-scope/#post-6541747)
 * Hi Spinaker,
 * I don’t have any experience with using MetaSlider, but it looks like they surface
   their image tag attributes with the [`metaslider_{type}_image_attributes`](https://www.metaslider.com/documentation/metaslider_type_slider_image_attributes/)
   filter. You can generate the `srcset` value attribute by using `TNSrcSet::get_image_srcset(
   $attachment_id, $size );`. Example usage may be something like the following:
 *     ```
       add_filter( 'metaslider_flex_slider_image_attributes', 'spinaker_metaslider_srcset_attribute', 10, 3 );
       function spinaker_metaslider_srcset_attribute( $attributes, $slide, $slider_id ) {
           // $attachment_id and $size will need to be replaced by your own data
           $attributes['srcset'] = TNSrcSet::get_image_srcset( $attachment_id, $size );
           return $attributes;
       }
       ```
   
 *  Thread Starter [spinaker](https://wordpress.org/support/users/spinaker/)
 * (@spinaker)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/srcset-groups-attribute-scope/#post-6541834)
 * That’s great Eric. Thank you for your response.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘SrcSet group's attribute scope’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/truenorth-srcset_0e658e.svg)
 * [SrcSet Responsive Images for Wordpress](https://wordpress.org/plugins/truenorth-srcset/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/truenorth-srcset/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/truenorth-srcset/)
 * [Active Topics](https://wordpress.org/support/plugin/truenorth-srcset/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/truenorth-srcset/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/truenorth-srcset/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [spinaker](https://wordpress.org/support/users/spinaker/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/srcset-groups-attribute-scope/#post-6541834)
 * Status: not resolved