ayastreb / bandwidth-hero

:guardsman: Saves data by compressing images on web page
https://bandwidth-hero.com/
MIT License
274 stars 51 forks source link

Some images do not go through the compression until after a reload. #7

Open ke-d opened 7 years ago

ke-d commented 7 years ago

STR:

  1. Go to https://www.ghacks.net/
  2. Click on an article with a picture.
  3. See that the picture is in full color and uncompressed.
  4. Reload the page.
  5. Now the same picture is compressed and greyscaled.
claustromaniac commented 7 years ago

I can't reproduce it. Sounds related to the cache.

ayastreb commented 7 years ago

I can't reproduce it too. Right, it could be related to browser cache - maybe it cached the full color image before. Also could be related to rate limiting on the proxy - sometimes webtask.io returns HTTP 429 Error, too many requests. But in this case it should not display the image at all.

ke-d commented 7 years ago

I can reproduce it in Firefox and Firefox on Android even with a clean cache.

I can also confirm that the problem does not exist in Chrome.

ayastreb commented 7 years ago

@mrdokenny thanks for confirming! Are you using the default proxy URL (https://wt-e9c9a7a436fcd9273a7f8890849dae65-0.run.webtask.io/bandwidth-hero-proxy) ? I will try to reproduce it with remote debug on my Android device...

ke-d commented 7 years ago

Yes, everything is at default.

claustromaniac commented 7 years ago

I tested on a new profile with only this extension installed and I still couldn't reproduce it. I'm using Firefox 56.0.1 (x64) on Windows, in case it's due to some sort of compatibility issue.

claustromaniac commented 7 years ago

I can confirm this now. It does happen, and the easiest way for me to confirm it was by searching for images on google. I did so on a clean firefox profile as previously stated, and some pictures were grayscaled while others weren't. Curiously, the latter always seem to be the ones closest to the top (and presumably the first ones to load).

Example: google images

claustromaniac commented 7 years ago

I will also add that sometimes when I visit a site for the first time I get to see some uncompressed images load before they are replaced by compressed versions without me doing anything.

I wish I could provide more useful feedback, but I'm not even sure how often this happens because most of the time it's actually pretty hard to notice, as the compressed versions are loaded almost immediately afterwards. Also, I can't tell what is happening in the area of websites that is not visible when they're still loading (before I scroll down).

ayastreb commented 7 years ago

@claustromaniac thank you for trying to help! I've tried to reproduce it as well, but can't seem to get it reproduced repeatedly, just happens sometimes randomly. Might have something to do with how browser events are handled. But I don't see a way to locate and fix it right now.

claustromaniac commented 7 years ago

@ayastreb I wish I could do more 😄

It is still an invaluable add-on for me so I wouldn't mind this staying a known issue in the future. It seems relatively minor.

Thank you again!