Asset optimization incorrectly optimizes CSS

Hello,

I noticed when a site has asset optimization on but with all options off (which in theory means it does nothing), there’s still some optimization occurring which breaks CSS with “url(#hash)” values. It may also break CSS in other conditions, but I’ve only tested in the conditions below.

I’ve created two proof of concept sites to show the issue. The first site has asset optimization “on” but all options unchecked.
Screenshot: https://i.imgur.com/iWw4GiB.png
Website: https://netlify-poc-1.netlify.app

The second site has asset optimization “off”.
Screenshot: https://i.imgur.com/Bll4MQY.png
Website: https://netlify-poc-2.netlify.app

The second site demonstrates expected behavior, which is to keep url(#hash) instead of “optimizing” it into the CDN.

I didn’t notice this issue during the day on September 2nd or before, so it seems to be something introduced late yesterday (Sept. 2nd) or sometime today (Sept. 3rd).

This also affects production sites, such as https://www.sarasoueidan.com/demos/css-svg-clipping/html-img-clipped-with-css-svg-clippath/

Let me know if you need more info or have any questions.

Regards,
Alesandro

1 Like

Thanks for the report and sorry to hear about the trouble!

I’ve gotten a bug filed on it, but I don’t expect a fix very soon, so you should probably avoid using that feature on our service if that is a feature you require for your site to operate well.

Thanks for filing the bug report.

I’ve fully turned off asset optimization, since I don’t use it at the moment. I don’t remember why I left the main toggle “on” with all subitems “off”.

I’ll wait until issue’s fixed to consider re-enabling if I need it in the future.

1 Like