# Hubspot's CSS Minification Causing Background Image SVG Issues

**URL:** <https://community.hubspot.com/t/hubspots-css-minification-causing-background-image-svg-issues/106637>\
**Category:** CMS Development\
**Tags:** css\
**Created:** [May 7, 2024, 3:04pm UTC](https://community.hubspot.com/t/hubspots-css-minification-causing-background-image-svg-issues/106637 "2024-05-07T15:04:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tristanisginger](https://avatars.discourse-cdn.com/v4/letter/t/5daacb/32.png) [@tristanisginger](https://community.hubspot.com/u/tristanisginger)\
**Post date:** [May 7, 2024, 3:04pm UTC](https://community.hubspot.com/t/hubspots-css-minification-causing-background-image-svg-issues/106637/1 "2024-05-07T15:04:14Z")

</div>

Hi

I am trying to set an svg as a background image in css however the minification is stripping out some important stuff.

This:

background-image: url(‘data&colon;image/svg+xml,\<svg xmlns=“[SVG namespace](http://www.w3.org/2000/svg)” viewBox=“0 0 100 100” preserveAspectRatio=“none”\>\<linearGradient id=“gradient” gradientTransform=“rotate(90)”\>\<stop offset=“6.05%” stop-color=“%23745BE4”/\>\<stop offset=“93.95%” stop-color=“%237EDE9C”/\>\</linearGradient\>\<rect x=“0” y=“0” width=“100” height=“100” fill=“url(%23gradient)”/\>\</svg\>’);

Becomes this:

background-image: url(data&colon;image/svg+xml;charset=utf-8,\<svg xmlns=“[SVG namespace](http://www.w3.org/2000/svg)” preserveAspectRatio=“none” viewBox=“0 0 100 100”\>\<path fill=“url(%23gradient)” d=“M0 0h100v100H0z”/\>\</svg\>);

---

<div class="post-metadata">

**Author:** ![GRajput](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/grajput/32/102020_2.png) [@GRajput](https://community.hubspot.com/u/GRajput)\
**Post date:** [May 8, 2024, 2:06pm UTC](https://community.hubspot.com/t/hubspots-css-minification-causing-background-image-svg-issues/106637/2 "2024-05-08T14:06:27Z")

</div>

Hi @tristanisginger

I would suggest try uploading that image in files and using that link.

Thanks!
