WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: W3 Total Cache] CSS Background images from Amazon S3

[Resolved] [Plugin: W3 Total Cache] CSS Background images from Amazon S3

  • Hi,

    I finally uploaded the entire media gallery to Amazon S3 and I was wondering how can I load the background images used in the CSS from S3.

    The theme images have been uploaded to S3 with the rest of the theme, but the minimified css links to absolute images on my own server.

    So is this something that’s not implemented? I mean using the css background images from S3, or am I just missing something?

    site link: http://www.cozmoslabs.com

    Thank you!
    Cristian

    http://wordpress.org/extend/plugins/w3-total-cache/

Viewing 10 replies - 1 through 10 (of 10 total)
  • I’ll check if this is a known bug, but for now you can simply remove the http://domain.com/ from your CSS file, leaving a path that starts with /wp-content/ and you’ll be all set (after rebuilding your minify cache).

    Can you use the bug submission form in the support tab to send the original CSS file also?

    Sorry to take so long to answer. It’s been a long week…

    Here is my original CSS (don’t think I need to use the submission form unless it helps you in some way):

    http://www.cozmoslabs.com/wp-content/themes/cozmic/style.css

    As you can see all the background:url(images/my_image.jpg) declarations are relative to the css file.

    Just as a sidenote the @import‘s at the top are also relative to the directory where this file resides and are loaded from the parent theme (since I’m using a parent theme <-> child theme relationship). If possible in the future all @import declarations in the main css file should be included directly by W3TC if possible. Those imports add each another http request.

    Here is my original CSS (don’t think I need to use the submission form unless it helps you in some way)

    I wouldn’t ask if it didn’t help. Your current settings and the minify error log etc are included with the submission to facilitate proper support.

    Just as a sidenote the @import‘s at the top are also relative to the directory where this file resides and are loaded from the parent theme (since I’m using a parent theme <-> child theme relationship). If possible in the future all @import declarations in the main css file should be included directly by W3TC if possible.

    This is a limitation of the minify library and a known issue. Other minification engines will be added later, hopefully addressing the issue, meanwhile it doesn’t appear like the minify team is very active with the project, which has made it difficult to move on with the W3TC project as a whole.

    I wouldn’t ask if it didn’t help. Your current settings and the minify error log etc are included with the submission to facilitate proper support.

    That makes sense. I’ve sent a bug report from the backend!

    Thank you.

    http://www.cozmoslabs.com/wp-content/themes/cozmic/style.css should be specified as: wp-content/themes/cozmic/style.css

    Unless a file has a query string variables, the path should be relative.

    What I did was simply ctrl F my css files and replaced my domain with the CDN url which essentially fixes this problem.

    Notepad++ can easily find / replace.

    If you use relative paths as appropriate this step is not necessary.

    Yup. That did the trick. I knew I was missing something.

    Thank you so much for your support.

    You’re welcome.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘[Resolved] [Plugin: W3 Total Cache] CSS Background images from Amazon S3’ is closed to new replies.
Skip to toolbar