Slimsy icon indicating copy to clipboard operation
Slimsy copied to clipboard

srcset attribute not created in v2

Open rbalai429 opened this issue 5 years ago • 0 comments

When I try to apply slimsy on image tag in v3 on image tag srcset attribute will automatically created but in v2 it's not created. Please see my code for Slimsy v3 & v2

<img data-srcset="@Url.GetSrcSetUrls(Model.PageContentPrimaryImage, new AspectRatio(2, 3)).ToHtmlString()" data-src="@Url.GetCropUrl(Model.PageContentPrimaryImage, quality: 99)" sizes="auto" class="lazyload" />

and after load the page I am getting result like this

In v3

<img data-srcset="/media/adpfpobq/untitled_2-17-1.jpg?anchor=center&mode=crop&width=1920&height=2880&format=auto&quality=80&rnd=132173430668530000 1920w" data-src="/media/adpfpobq/untitled_2-17-1.jpg?anchor=center&mode=crop&quality=99&rnd=132173430668530000" sizes="300" class="lazyautosizes lazyloaded" srcset="/media/adpfpobq/untitled_2-17-1.jpg?anchor=center&mode=crop&width=160&height=240&format=auto&quality=80&rnd=132173430668530000 1920w" src="/media/adpfpobq/untitled_2-17-1.jpg?anchor=center&mode=crop&quality=99&rnd=132173430668530000"/>

and in v2

<img data-srcset="/media/adpfpobq/untitled_2-17-1.jpg?anchor=center&mode=crop&width=1920&height=2880&format=auto&quality=80&rnd=132173430668530000 1920w" data-src="/media/adpfpobq/untitled_2-17-1.jpg?anchor=center&mode=crop&quality=99&rnd=132173430668530000" sizes="300" class="lazyautosizes lazyloaded" />

rbalai429 avatar Nov 30 '19 12:11 rbalai429