DEV Community

Discussion on: How do you use an SVG as background image without affecting security?

Collapse
 
drishit96 profile image
Drishit Mitra • Edited

Thanks for all who helped πŸ™‚.
I have found out the cause of my problem.
I had used vue-cli to build my project and it used a package called 'url-loader' which was inlining images as data urls whenever the size of the image was less than 1000 bytes. That's the reason why my relative URL was getting converted to data url. I have reduced that limit to 1 byte to avoid any conversion.