Skip to content

Responsive images

The VIP File System serves images with the srcset and sizes attributes to all images.  Example:

<img src=""
    sizes="(max-width: 660px) 100vw, 660px"
    srcset=" 5472w,,169 300w,,432 768w,,576 1024w"
    height="371" />

To implement a custom srcset implementation, disable the responsive image support by using this filter:

add_filter( 'vip_go_srcset_enabled', '__return_false' );


WordPress only outputs images with the same aspect ratio to the srcset attribute. For images of different aspect ratios, consider using the wp_calculate_image_srcset filter.

Last updated: November 22, 2022