Issue with image names being changed by server --


Hi everyone.

For 2 days now, I have been pulling out my hair, asking everyone I can think of who knows ANYTHING about apache, and generally crying, all because of this problem.

I have a script on my site that changes images inside of a grid. There are 96 images total (3 squares of 16 grid-boxes across top row, 2 on 2nd row, and 1 on last row)

My page would load just fine, but as soon as I hit refresh, the server would change my image names to URL base code (I.e. data:gif base64, blablabla)

It was driving me NUTS! I couldn’t use the script without it still working if someone refreshes the page!

It took me 2 days, but I did figure it out eventually - here is the answer:

mod_pagespeed !!

It’s horrible! I mean, it’s good when it works, but it’s terrible when it doesn’t. It is to speed up the page load times. Even disabling cache for the page won’t fix this error. To fix it, you need to create (or edit) an .htaccess with the following line:

ModPagespeed off

That should solve your issues.


What you are describing is correct behavior for mod_pagespeed. It works by rewriting your pages, which may include inlining images. If you don’t want this behavior, don’t turn on mod_pagespeed.


You can turn it off via Manage Domains in Panel. It’s actually off by default in my Panel, and has a BETA image highlighted in red as a subtle hint to be careful with selecting it.