Clarity Posted July 26, 2022 Share Posted July 26, 2022 Hello everyone! I'm trying to resize SVG image using size() function. However, the image appears to be unchanged. I'm using FileValidatorSvgSanitizer module for sanitization of SVGs. What should I do for resizing SVG image if I want to resize them programmatically? Link to comment Share on other sites More sharing options...
3fingers Posted July 26, 2022 Share Posted July 26, 2022 May I ask you why are you trying to resize svg? Svg are scalable by nature, so my personal approach you be to size them via css or html attributes on the svg tag itself. 4 1 Link to comment Share on other sites More sharing options...
Clarity Posted July 27, 2022 Author Share Posted July 27, 2022 The reason why I was trying to resize SVG is that I need to make repeated set of images sizes of which are independent of sizes which user loads into the field. Anyways, adding width and height attributes resolved my problem. Thank you for the advice! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now