{{responsiveSrcSet}} helper

Helper for the srcset attribute for the given image. The helper builds the list from the image sizes defined in the files.responsiveImages section of the theme's config.json. In most cases responsiveImageAttributes outputs srcset and sizes together.

Syntax:

{{responsiveSrcSet IMAGE_PATH TYPE_NAME GROUP_NAME}}

Example:

{{responsiveSrcSet @config.custom.imageOptionName 'featuredImage' 'header'}}

Create your first website with Publii

Join thousands of creators who chose independence. Create content locally and publish lightning-fast, secure websites on your own terms.

Download Publii

Free and open source. Windows, macOS and Linux.

Read the getting started guide