Glass.Mapper
Glass.Mapper copied to clipboard
BuildImageUrl with Image properties
When using Glass we used the Src property to set a background image via inline CSS.
Recently we noticed that the width, height, maxwidth, maxheight, ... properties from Sitecore were being ignored.
Example code:
<section style="background: url('@Model.HeaderImage.Src')">
...
</section>
Looking into the source code I see that the properties are being appended onto the image URL when using RenderImage().
It would be useful to have an option to only render the Image URL so we can add it as a background image.
Fe BuildImageUrl()
Thanks, we will investigate. I am sure we had this request before and done something.
Did you find more info about someone else requesting this? If not, I can look into adding this new function.