Responsive Images
The VIP Go Files Service serves images with the srcset
and sizes
attributes to all images. Example:
<img src="https://site.go-vip.co/wp-content/uploads/2018/09/image.jpg"
sizes="(max-width: 660px) 100vw, 660px"
srcset="https://site.go-vip.co/wp-content/uploads/2018/09/image.jpg 5472w, https://site.go-vip.co/wp-content/uploads/2018/09/image.jpg?resize=300,169 300w, https://site.go-vip.co/wp-content/uploads/2018/09/image.jpg?resize=768,432 768w,https://site.go-vip.co/wp-content/uploads/2018/09/image.jpg?resize=1024,576 1024w"
width="660"
height="371" />
If you want to roll your own srcset
implementation, you can disable our responsive images support by using this filter:
add_filter( 'vip_go_srcset_enabled', '__return_false' );
Note
WordPress only outputs images with the same aspect ratio to the srcset
attribute. If you need images of different aspect ratios, consider using the wp_calculate_image_srcset
filter.