{{responsiveSizes}} helper

Helper for the sizes attribute in the images syntax, based on options. The helper reads the value from the files.responsiveImages section of the theme's config.json, so you define the sizes once for each image type and group. In most cases responsiveImageAttributes outputs srcset and sizes together.

Syntax:

{{responsiveSizes [type] [group]}}

Example:

{{responsiveSizes '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