New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

recompress_images filter breaks Firefox on Android #1160

Closed
geotekberlin opened this Issue Oct 27, 2015 · 10 comments

Comments

Projects
None yet
4 participants
@geotekberlin
Copy link

geotekberlin commented Oct 27, 2015

"recompress_images" breaks jpg images on Firefox mobile. The optimized Images show up as empty boxes with the correct size and Alt text only. All other browsers that I tested (Firefox on Windows, Chrome, IE11) are rendering the optimized images correctly

It is interesting that disabling recompress_jpeg is not enough to work around the bug, I have to disable recompress_images or rewrite_images altogether in order to work around the bug.

Website involved: http://geotek.de/
(recompress_images is disabled at the moment, but I can enable it any time if someone would like to see the bug)

Client Versions:
Firefox mobile 41.0.2
Android 5.0.1

Server Versions:
mod_pagespeed-1.9.32.4-4.1.x86_64 (Prebuilt Suse Package)
OpenSuse 13.2 x64
Apache 2.4.10-25.1

Pagespeed configuration is default out of the box, nothing changed or altered

@crowell

This comment has been minimized.

Copy link
Contributor

crowell commented Oct 27, 2015

I just tested on firefox for android v41.0.2, turning on the recompress_images filters with query options

http://geotek.de/cms/?PageSpeedFilters=+debug,+recompress_images


mod_pagespeed on
Filters:
ah  Add Head
cc  Combine Css
jc  Combine Javascript
gp  Convert Gif to Png
jp  Convert Jpeg to Progressive
jw  Convert Jpeg To Webp
mc  Convert Meta Tags
pj  Convert Png to Jpeg
db  Debug
ec  Cache Extend Css
ei  Cache Extend Images
es  Cache Extend Scripts
fc  Fallback Rewrite Css 
if  Flatten CSS Imports
hw  Flushes html
ci  Inline Css
ii  Inline Images
il  Inline @import to Link
ji  Inline Javascript
js  Jpeg Subsampling
rj  Recompress Jpeg
rp  Recompress Png
rw  Recompress Webp
ri  Resize Images
cf  Rewrite Css
jm  Rewrite External Javascript
jj  Rewrite Inline Javascript
cu  Rewrite Style Attributes With Url
cp  Strip Image Color Profiles
md  Strip Image Meta Data

Options:
EnableRewriting (e) 1
FileCacheInodeLimit (afcl) 500000
RunExperiment (fur) False
Statistics (ase) True
StatisticsLogging (asle) True

#NumFlushes            0
#EndDocument after     9754us
#Total Parse duration  1060us
#Total Render duration 16979us
#Total Idle duration   8694us
No critical images detected.
The following filters were disabled for this request:
    SupportNoscript

And the images appear normally.

Did you change anything else in the configuration between now and then?

@geotekberlin

This comment has been minimized.

Copy link

geotekberlin commented Oct 27, 2015

Hi Jeffrey,

yes, I had the option ModPagespeedDisableFilters recompress_images set.
I took out this option and the images are gone again on my smarphone.

Martin

Jeffrey Crowell notifications@github.com 27.10.2015 14:54 >>>
I just tested on firefox for android v41.0.2, turning on the
recompress_images filters with query options
http://geotek.de/cms/?PageSpeedFilters=+debug,+recompress_images
mod_pagespeed on Filters: ah Add Head cc Combine Css jc Combine
Javascript gp Convert Gif to Png jp Convert Jpeg to Progressive jw
Convert Jpeg To Webp mc Convert Meta Tags pj Convert Png to Jpeg db
Debug ec Cache Extend Css ei Cache Extend Images es Cache Extend Scripts
fc Fallback Rewrite Css if Flatten CSS Imports hw Flushes html ci Inline
Css ii Inline Images il Inline @import to Link ji Inline Javascript js
Jpeg Subsampling rj Recompress Jpeg rp Recompress Png rw Recompress Webp
ri Resize Images cf Rewrite Css jm Rewrite External Javascript jj
Rewrite Inline Javascript cu Rewrite Style Attributes With Url cp Strip
Image Color Profiles md Strip Image Meta Data Options: EnableRewriting
(e) 1 FileCacheInodeLimit (afcl) 500000 RunExperiment (fur) False
Statistics (ase) True StatisticsLogging (asle) True #NumFlushes 0
#EndDocument after 9754us #Total Parse duration 1060us #Total Render
duration 16979us #Total Idle duration 8694us No critical images
detected. The following filters were disabled for this request:
SupportNoscript
And the images appear normally.
Did you change anything else in the configuration between now and
then?

Reply to this email directly or view it on GitHub
(
#1160 (comment))
.

@geotekberlin

This comment has been minimized.

Copy link

geotekberlin commented Oct 30, 2015

I can't afford to leave the production site on with missing images any longer, so I had to disable recompress_images again.

The broken images can now be viewed on http://staging.geotek.de/cms/

Any ideas what's going wrong?

@jeffrey: Please delete the image above, it is licensed material from a stock photo agency that is known to enforce copyright violations very rigorously, I don't want you to get into trouble!

@crowell

This comment has been minimized.

Copy link
Contributor

crowell commented Oct 30, 2015

@geotekberlin it seems like we're serving .webp files to firefox mobile, which cant read .webp.
these should only be served to android/chrome browsers.

@crowell

This comment has been minimized.

Copy link
Contributor

crowell commented Oct 30, 2015

this is most likely a bug on our side, do you have any sort of caching in place in front of apache that could cause the pages to not be handled by apache, and instead just from the caching layer?

@geotekberlin

This comment has been minimized.

Copy link

geotekberlin commented Oct 30, 2015

The cms system does some php based caching and css combining but there is no cache and no proxy in front of apache. 

Von meinem Samsung Gerät gesendet.

-------- Ursprüngliche Nachricht --------
Von: Jeffrey Crowell notifications@github.com
Datum: 30.10.2015 21:12 (GMT+01:00)
An: pagespeed/mod_pagespeed mod_pagespeed@noreply.github.com
Cc: geotekberlin ka@geotek.de
Betreff: Re: [mod_pagespeed] recompress_images filter breaks Firefox on
Android (#1160)

this is most likely a bug on our side, do you have any sort of caching in place in front of apache that could cause the pages to not be handled by apache, and instead just from the caching layer?


Reply to this email directly or view it on GitHub.

@jeffkaufman

This comment has been minimized.

Copy link
Contributor

jeffkaufman commented Nov 13, 2015

@huibaolin You were working on this, right? Is the problem that we see "android" in the UA and think "android browser" and so send WebP?

@huibaolin

This comment has been minimized.

Copy link
Contributor

huibaolin commented Nov 13, 2015

Yes. I've a fix for this bug and the fix has been approved.

And yes, the problem is caused by the "Android" substring in the UA, so it is confused as Android browser, and so we send WebP to it.

@jeffkaufman

This comment has been minimized.

Copy link
Contributor

jeffkaufman commented Nov 13, 2015

Ok, thanks. Let me know when the fix is in?

@crowell crowell closed this Nov 25, 2015

@crowell

This comment has been minimized.

Copy link
Contributor

crowell commented Nov 25, 2015

closed by 41871f9 will be included in the next beta release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment