{"action":"created","issue":{"url":"https://api.github.com/repos/pagespeed/ngx_pagespeed/issues/969","labels_url":"https://api.github.com/repos/pagespeed/ngx_pagespeed/issues/969/labels{/name}","comments_url":"https://api.github.com/repos/pagespeed/ngx_pagespeed/issues/969/comments","events_url":"https://api.github.com/repos/pagespeed/ngx_pagespeed/issues/969/events","html_url":"https://github.com/pagespeed/ngx_pagespeed/issues/969","id":78325919,"number":969,"title":"rewrite_css for images doesn't work under media queries","user":{"login":"VarunBatraIT","id":368316,"avatar_url":"https://avatars.githubusercontent.com/u/368316?v=3","gravatar_id":"","url":"https://api.github.com/users/VarunBatraIT","html_url":"https://github.com/VarunBatraIT","followers_url":"https://api.github.com/users/VarunBatraIT/followers","following_url":"https://api.github.com/users/VarunBatraIT/following{/other_user}","gists_url":"https://api.github.com/users/VarunBatraIT/gists{/gist_id}","starred_url":"https://api.github.com/users/VarunBatraIT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VarunBatraIT/subscriptions","organizations_url":"https://api.github.com/users/VarunBatraIT/orgs","repos_url":"https://api.github.com/users/VarunBatraIT/repos","events_url":"https://api.github.com/users/VarunBatraIT/events{/privacy}","received_events_url":"https://api.github.com/users/VarunBatraIT/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-20T01:43:32Z","updated_at":"2015-05-21T03:34:10Z","closed_at":null,"body":"### Pagespeed Configuration\r\n\r\n```\r\n        pagespeed EnableFilters rewrite_images;\r\n        pagespeed EnableFilters recompress_images;\r\n        pagespeed ImageRecompressionQuality 80;\r\n        pagespeed EnableFilters rewrite_css;\r\n        pagespeed EnableFilters sprite_images;\r\n        pagespeed EnableFilters rewrite_style_attributes;\r\n```\r\n\r\n### Original CSS\r\n\r\n```css\r\n.parallax-bg-4\r\n{\r\n  background-image: url(http://www.stumento.com/assets/parallax/mobile/writing-c4ed5b0467ca93a2a02d6141c6f9ed3c.jpg);\r\n}\r\n@media screen and (min-width: 768px)\r\n{\r\n  .parallax-bg-2\r\n  {\r\n    background-image: url(http://www.stumento.com/assets/parallax/mobile/writing-c4ed5b0467ca93a2a02d6141c6f9ed3c.jpg);\r\n  }\r\n}\r\n\r\n```\r\n\r\n\r\n\r\n### Current Output ###\r\n\r\nRewrite didn't happen for .parallax-bg-2\r\n\r\n```css\r\n.parallax-bg-4\r\n{\r\n  background-image: url(http://www.stumento.com/assets/parallax/mobile/xwriting-c4ed5b0467ca93a2a02d6141c6f9ed3c.jpg.pagespeed.ic.4zTzy_hob0.jpg);\r\n}\r\n@media screen and (min-width: 768px)\r\n{\r\n  .parallax-bg-2\r\n  {\r\n    background-image: url(http://www.stumento.com/assets/parallax/mobile/writing-c4ed5b0467ca93a2a02d6141c6f9ed3c.jpg);\r\n  }\r\n}\r\n\r\n```\r\n\r\n### Expected Output ###\r\nBoth of above files are same. Thus one should expect\r\n\r\n\r\n```css\r\n.parallax-bg-4\r\n{\r\n  background-image: url(http://www.stumento.com/assets/parallax/mobile/xwriting-c4ed5b0467ca93a2a02d6141c6f9ed3c.jpg.pagespeed.ic.4zTzy_hob0.jpg);\r\n}\r\n@media screen and (min-width: 768px)\r\n{\r\n  .parallax-bg-2\r\n  {\r\n    background-image: url(http://www.stumento.com/assets/parallax/mobile/xwriting-c4ed5b0467ca93a2a02d6141c6f9ed3c.jpg.pagespeed.ic.4zTzy_hob0.jpg);\r\n  }\r\n}\r\n\r\n```\r\n\r\n### Other Details ###\r\n\r\n1. nginx version: nginx/1.8.0\r\n2. X-Page-Speed:1.9.32.3-4448\r\n3. Reference link https://developers.google.com/speed/pagespeed/module/filter-css-rewrite\r\n4. Website URL http://StuMento.com/\r\n5. Ubuntu 15.04 (GNU/Linux 3.19.1-x86_64-linode53 x86_64)"},"comment":{"url":"https://api.github.com/repos/pagespeed/ngx_pagespeed/issues/comments/104113868","html_url":"https://github.com/pagespeed/ngx_pagespeed/issues/969#issuecomment-104113868","issue_url":"https://api.github.com/repos/pagespeed/ngx_pagespeed/issues/969","id":104113868,"user":{"login":"VarunBatraIT","id":368316,"avatar_url":"https://avatars.githubusercontent.com/u/368316?v=3","gravatar_id":"","url":"https://api.github.com/users/VarunBatraIT","html_url":"https://github.com/VarunBatraIT","followers_url":"https://api.github.com/users/VarunBatraIT/followers","following_url":"https://api.github.com/users/VarunBatraIT/following{/other_user}","gists_url":"https://api.github.com/users/VarunBatraIT/gists{/gist_id}","starred_url":"https://api.github.com/users/VarunBatraIT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VarunBatraIT/subscriptions","organizations_url":"https://api.github.com/users/VarunBatraIT/orgs","repos_url":"https://api.github.com/users/VarunBatraIT/repos","events_url":"https://api.github.com/users/VarunBatraIT/events{/privacy}","received_events_url":"https://api.github.com/users/VarunBatraIT/received_events","type":"User","site_admin":false},"created_at":"2015-05-21T03:34:10Z","updated_at":"2015-05-21T03:34:10Z","body":"For the time being I have disabled the compression of images and I am relying on available opensource libraries to compress. I did this because of multiple urls for same image (virtually same one compressed and other uncompressed)"}}