I created rendering variant and inserted field like that:

enter image description here

and the image rendered as :

<img src="/master-site/-/media/Project/ADGEs/Master-Site/Register-Icon.svg" alt="" style="margin: 0px 0px;">

I need to remove inline style in the image tag, Is there a way to do that???

1 Answer 1


SetImageStyleParameters from Sitecore.XA.Foundation.SitecoreExtensions.Pipelines.RenderField is responsible for that. It is used to add HSpace and VSpace from image properties. I don't know which version of SXA are you using but in the newest version, it should not add any additional margin when both HSpace and VSpace are 0.

If you don't need it, simply comment out this processor:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.