Skip to content

Documentation

Extensive Documentation for PowerPack & WooPack to help you with common questions and issues.

PowerPack

⌘K
  1. Home
  2. Docs
  3. PowerPack
  4. Modules
  5. Photo Gallery
  6. How to Add “srcset” Attribute to Tags in the Photo Gallery Module?

How to Add “srcset” Attribute to Tags in the Photo Gallery Module?

You can add “srcset” attribute to <img> tags in the Photo Gallery Module using the following filter: pp_gallery_output_image_srcset

Please add the following code in your current theme’s functions.php file to enable the “srcset” attribute:

add_filter( 'pp_gallery_output_image_srcset', '__return_true' );
×