Images in CSS

Images in CSS

Postby paulzz » Wed Jun 21, 2017 11:33 am

How do I link images that are defined in my CSS?
I'm using Wordpress but lots of my images have to be added this way.
paulzz
 
Posts: 3
Joined: Wed Jun 21, 2017 11:31 am

Re: Images in CSS

Postby aaronp » Thu Jun 22, 2017 10:48 am

Hi,

While you may define your images whichever way you'd like in your CSS, the ImageEngine plugin does not touch the CSS so you cannot link images defined in your CSS. When the ImageEngine plugin is installed, images published as part of the content are optimized by ImageEngine; and then if you want the referred images in your theme to be optimized (logos, designs, elements, etc.), you will have to change the theme to use the plugin.

What you could do to have an image in your CSS be optimized by ImageEngine, would be to append your ImageEngine token to your image URL like such:

Code: Select all
#divID {
background-image: url("http://TOKEN.lite.imgeng.in/http://www.example.com/image.jpg");
....
}


Hope this helps. Feel free to let me know if you have any other questions or concerns.

Thanks,

Aaron
aaronp
 
Posts: 185
Joined: Wed Dec 09, 2015 12:39 pm

Re: Images in CSS

Postby paulzz » Fri Jun 23, 2017 7:00 am

Thanks Aaron!

Do you know if I can use https instead? Using http would break the TLS certificate.
paulzz
 
Posts: 3
Joined: Wed Jun 21, 2017 11:31 am

Re: Images in CSS

Postby aaronp » Fri Jun 23, 2017 9:09 am

Hi,

You can use https instead of http.

Aaron
aaronp
 
Posts: 185
Joined: Wed Dec 09, 2015 12:39 pm

Re: Images in CSS

Postby paulzz » Fri Jun 23, 2017 12:04 pm

Great, thanks.
paulzz
 
Posts: 3
Joined: Wed Jun 21, 2017 11:31 am


Return to ImageEngine

Who is online

Users browsing this forum: No registered users and 1 guest

cron