1

I've got my MVC5 set to optimize all of my JavaScript & CSS files. The optimization of the JavaScript & CSS files are optimizing as expect.

Where my issue is coming in at is that the CSS images or images that I've got in my CSS files are also being optimized, as in, the path to the images directory is being altered by the optimizer. This is leading to unwanted behavior because I'm now getting a 404 for the images page that is linked to the images in the CSS file.

What setting do I set so that the images path does not get altered during optimization of the css files?

Bundles-Screen-Shot-L

Bundles-Screen-Shot-S

1 Answers1

1
bundles.Add(new StyleBundle("~/Content/css/jquery-ui/bundle")
       .Include("~/Content/css/jquery-ui/*.css", new CssRewriteUrlTransform()));

As found on MVC4 StyleBundle not resolving images

Community
  • 1
  • 1
Jon Douglas
  • 13,006
  • 4
  • 38
  • 51