Is there a way to get width
and height
for img
elements emitted automatically? We want to use this as one way to avoid layout shifts, and CSS as another way.
We use accelerator code like @Html.ImageFor(p => i.VariantImage, maxSize: new Size(100, 100) ... )
to emit images in templates.
Can you get Litium.Web.Mvc.HtmlHelperExtensions.ImageFor()
(used above) to emit width and height? Or can you get the dimensions some other way to emit them at render time? Since Litium makes a thumbnail with the desired dimensions it feels like it should be able to tell you those dimensions.
Litium version: 7 + accelerator