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' );
🎃 🎃

⚡ HALLOWEEN FLASH SALE! Save up to 40% OFF  Claim Your Treats ➔

🎃 Wait! Your Halloween Savings Are Still Here!

You're about to miss our biggest sale of the year. Save up to 40% and secure unlimited site licenses before the Halloween sale ends.

×