vhs icon indicating copy to clipboard operation
vhs copied to clipboard

Srcset Images not generated correctly

Open DavidCzadilek opened this issue 8 years ago • 2 comments

Related to #1099

When defining width and height both with crop, srcset images are not generated correctly.

This code generates 200x200 cropped images, as it should: <v:media.image src="{column.media}" alt="test" width="200c" height="200c" relative="0" treatIdAsReference="1" />

This code generates "non-square" images with a max-width of 200 - should be squared though: <v:media.image src="{column.media}" alt="test" width="200c" height="200c" srcset="200,300,400,500" relative="0" treatIdAsReference="1" />

This code doesn't work at all / generates img tags with empty src attr.: <v:media.image src="{column.media}" alt="test" width="200c" height="200c" srcset="200c,300c,400c,500c" relative="0" treatIdAsReference="1" />

DavidCzadilek avatar Aug 29 '16 14:08 DavidCzadilek

you could try this: https://gist.github.com/misterboe/cdfbb24c7c9fd16c57890fad4fb215fe

misterboe avatar Aug 31 '16 06:08 misterboe

Any news on this? I am facing the same problem and do not want to rely on coming up with my own partial. This must obviously be some bug in the VHS viewhelper. I am currently using the master version and the problem is still there.

sophiequ avatar Aug 19 '17 09:08 sophiequ