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' );
PowerPack Beaver Addons Black Friday Deal
Our Biggest Sale of the Year
Save up to 50% OFF

Wait! Don't Miss Our Biggest Sale of the Year!

SAVE UP TO 50% OFF

Get premium Beaver Builder addons at our lowest prices of the year. Build better websites for less!

Limited-time offer • Don't miss out!

×