Problem with "Assets Optimization" setting in Netlify

My website is working fine until I enable “Assets optimization” setting in Netlify. Whenever I enable this option, the website is giving a totally broken appearance. I understood this is happening because netlify is rewriting asset files URL’s in my HTML pages. For example, if my original stylesheet URL is www.example.com/assets/stylesheet/main.min.css, netlify replaces it with something like www.dwqeb3923.cloudfront.net/....js. When I open these cloudfront URL’s in browser, it just returns a blank page. Original URL’s are working fine.

Now I disabled “assets optimization” and site is working fine again (But loading too slow). I played with the setting a few times toggling it ON-OFF across different sites. Every time I turned ON, it’s definitely breaking the site.

Sri, can you give us more information about your site? What is your netlify instance name, for example?

Yes, could you please open this in your browser: view-source:https://www.pixelandhra.com/. It was a page served from Netlify with “Assets optimization” enabled. Netlify automatically added several URL’s like “'https://d33wubrfki0l68.cloudfront.net/js/adc83b19e793491b1c6ea0fd8b46cd9f32e592fc/msalign/assets/javascripts/modernizr.74668098.js” in place of my original URL’s like : “/wp-content/themes/pixelandhra/style.css”.

All the cloudfront URL’s added by netlify are now non-functional and just returning blank page. The whole website is appearing broken now. Website is returning to its original design when I disable assets optimization from the netlify settings.

I am going to disable “assets optimization” setting now. Because there would be few visitors to the site today, so its important to look good. But I saved all the non-functional links which I am seeing when the assets optimization is enabled. Let me know if you need them to figure-out this issue.

Hi @Sri,

Thanks for the info. We definitely see the problem and I have an issue opened so our devs can look in to it. We’ll let you know once we’ve resolved it. In the meantime my recommendation is to disable asset optimization. Sorry for the inconvenience!