Title: Processing images in CSS files
Last modified: March 7, 2022

---

# Processing images in CSS files

 *  Resolved [rudolfl](https://wordpress.org/support/users/rudolfl/)
 * (@rudolfl)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/processing-images-in-css-files/)
 * Hi,
 * Need an advice here.
 * I have following issue:
    Site loads CSS from file that was processed by Autoptimize.
   CSS contains some background images. Autoptimize replaces URLs with one from 
   CDN specified, but… I do not want this.
 * The reason is that I use different CDN for the images. I use Optimole service
   that optimizes images on the fly and serves them from own CDN, which is different
   from CDN I use for fonts and other static resources.
 * How can I get around this? Is there a way to exclude certain file types or images
   from being optimized? I can only see exclusions on the script level.
 * Thanks,
    Rudolf

Viewing 1 replies (of 1 total)

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/processing-images-in-css-files/#post-15433156)
 * No, exclusions don’t work on the CDN level I’m afraid, but you could use the `
   autoptimize_filter_base_replace_cdn` filter to undo CNN’ing for images OR you
   could disable CDN in AO and then use `autoptimize_html_after_minify` to only 
   CDN the AO’ed CSS/ JS files in the HTML?
 * hope this helps,
    frank

Viewing 1 replies (of 1 total)

The topic ‘Processing images in CSS files’ is closed to new replies.

 * ![](https://ps.w.org/autoptimize/assets/icon-256X256.png?rev=2211608)
 * [Autoptimize](https://wordpress.org/plugins/autoptimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autoptimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autoptimize/)
 * [Active Topics](https://wordpress.org/support/plugin/autoptimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autoptimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autoptimize/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [4 years, 3 months ago](https://wordpress.org/support/topic/processing-images-in-css-files/#post-15433156)
 * Status: resolved