Responsive images (sizes/srcset) generator for Evolution CMS

If you look for a Evolution CMS snippet that will generate srcset/sizes for your image, look no further

"srcset" is a simple img srcset generator snippet for Evolution CMS. You can download it from here https://github.com/pmfx/evo-srcset

Call

[ [srcset? 
&input=`YourImageGoesHere` 
&sizes=`(min-width: 1200px) 1140px, 
        (min-width: 992px) 940px, 
        (min-width: 768px) 720px, 
        calc(100vw - 30px)` 
&srcset=`330,546,720,940,1140,1440,1880`
&defaultSize=`1140`
&quality=`80`
&attrAlt=`Image alt text`
&attrClass=`img-responsive`
&attrStyle=`display: inline-block`
&attrCustom=`data-test="success"`
] ]

Result

<img sizes="(min-width: 1200px) 1140px,
            (min-width: 992px) 940px,
            (min-width: 768px) 720px,
            calc(100vw - 30px)" 
srcset="assets/cache/images/150944-330x-70e.jpg 330w,
        assets/cache/images/150944-546x-b43.jpg 546w,
        assets/cache/images/150944-720x-33b.jpg 720w,
        assets/cache/images/150944-940x-70d.jpg 940w,
        assets/cache/images/150944-1140x-6d1.jpg 1140w,
        assets/cache/images/150944-1440x-e5d.jpg 1440w,
        assets/cache/images/150944-1880x-ef3.jpg 1880w" 
src="assets/cache/images/150944-1140x-6d1.jpg" 
class="img-responsive" 
style="display: inline-block" 
alt="Image alt text" 
data-test="success">