incubator-pagespeed-ngx icon indicating copy to clipboard operation
incubator-pagespeed-ngx copied to clipboard

ngx_pagespeed breaks png image on Chrome, no issue with other browsers

Open loano opened this issue 6 years ago • 4 comments
trafficstars

Our .png logo breaks in Chrome Desktop with ngx_pagespeed on. Tested Chrome Versions 76.0.3809.132 & 77.0.3865.75 There is no issue when visiting with other browsers (tested with Firefox and Edge). Error in Chrome Console: Failed to load resource: the server responded with a status of 404 () Link to live example: https://babynews.de/

loano avatar Sep 13 '19 19:09 loano

One day later, the issue disappeared. I have no idea why this happened but it seems that on Chrome the image was loaded as .webp which did not display. Now it loads like the image on Firefox and Edge as png. (Without any change on our side)

Screenshot showing the issue: Logo has gone on Chrome

Image URLs when the issue appeared:

Crome https://babynews.de/wp-content/uploads/2019/02/xBabynews-Logo-Turquoise-V2.png.pagespeed.ic.NNX9kzHryG.webp

Firefox https://babynews.de/wp-content/uploads/2019/02/xBabynews-Logo-Turquoise-V2.png.pagespeed.ic.uW3vstNDR7.png

Edge https://babynews.de/wp-content/uploads/2019/02/xBabynews-Logo-Turquoise-V2.png.pagespeed.ic.uW3vstNDR7.png

I would still be interested in how the problem could simply occur and then disappear again.

loano avatar Sep 14 '19 11:09 loano

Hi @loano I think is cloudflare related.... Have you tried to disable CF? Whats happend when you disable it?

Lofesa avatar Sep 14 '19 17:09 Lofesa

i see that your logo file is in webp

https://babynews.de/wp-content/uploads/2019/02/xBabynews-Logo-Turquoise-V2.png.pagespeed.ic.NNX9kzHryG.webp

did you enable pagespeed image compression? I think, not all browser already support webp i suggest you to disable webp conversion on pagespeed conf, try this

pagespeed DisableFilters convert_jpeg_to_webp,convert_to_webp_lossless,convert_to_webp_animated,recompress_webp;

also, when I visit your logo file it is throwing 404 not found https://babynews.de/wp-content/uploads/2019/02/xBabynews-Logo-Turquoise-V2.png

may be typo? just guessing, your correct logo url is here (without x) https://babynews.de/wp-content/uploads/2019/02/Babynews-Logo-Turquoise-V2.png

joglomedia avatar Sep 23 '19 05:09 joglomedia

@joglomedia Pagespeed convert images to webp format when the browser support it. If not, the images get converted to jpg or still in png (if you enable jpg conversion and the image get a small size). The issue that @loano is facing is that it uses Cloufare. But now, seems that @loano was revappered their site and show a mix between a normal page and an amp page, and uses some thirparty website or library to load assest, and the assest are loaded 2-3 times the same assest........

Lofesa avatar Sep 23 '19 07:09 Lofesa