Title: Converting CSS Background images
Last modified: March 20, 2019

---

# Converting CSS Background images

 *  Resolved [iworldc](https://wordpress.org/support/users/iworldc/)
 * (@iworldc)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/converting-css-background-images/)
 * Hi,
 * I use Thrive Architect and many images on TA styled pages are inserted as CSS
   background images.
 * It seems these images are not converted to webp, since there are no IMG tags 
   in the HTML source. Just DIV’s with classes.
 * How can these images also be served as webp?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [rosell.dk](https://wordpress.org/support/users/roselldk/)
 * (@roselldk)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/converting-css-background-images/#post-11336944)
 * Two ways to accomplish that:
 * 1) Use “Varied image responses” mode. In that mode it makes no difference how
   the image is placed in the HTML
 * 2) If the CSS class definitions (which contains the image urls) are placed in
   the HTML, you can use Alter HTML, but you will have to select “Replace image 
   URLs”. The “Picture tag syntax” only works on IMG tags, but “Replace image URLs”
   even works on CSS background URLs. PROVIDED the background urls are placed in
   the HTML. If the backgrounds are in external CSS, it will not work as external
   CSS isn’t processed by the “Alter HTML” functionality
    -  This reply was modified 7 years, 2 months ago by [rosell.dk](https://wordpress.org/support/users/roselldk/).
 *  Plugin Author [rosell.dk](https://wordpress.org/support/users/roselldk/)
 * (@roselldk)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/converting-css-background-images/#post-11336948)
 * resolved

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Converting CSS Background images’ is closed to new replies.

 * ![](https://ps.w.org/webp-express/assets/icon.svg?rev=1918288)
 * [WebP Express](https://wordpress.org/plugins/webp-express/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/webp-express/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/webp-express/)
 * [Active Topics](https://wordpress.org/support/plugin/webp-express/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/webp-express/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/webp-express/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [rosell.dk](https://wordpress.org/support/users/roselldk/)
 * Last activity: [7 years, 2 months ago](https://wordpress.org/support/topic/converting-css-background-images/#post-11336948)
 * Status: resolved