diff --git a/README.md b/README.md index e45c42c..02b09ff 100644 --- a/README.md +++ b/README.md @@ -6,22 +6,16 @@ Bandwidth Hero is a Chrome extension which compresses images on the page to save ![Workflow](https://raw.githubusercontent.com/ayastreb/bandwidth-hero/master/docs/workflow.png) -1. When active, Bandwidth Hero prevents original images loading and replaces them with a placeholder +1. When active, Bandwidth Hero intercepts all images loading requests 2. It sends each image URL to the compression proxy server, hosted at Heroku -3. Proxy server downloads the original image and compresses it -4. When image is compressed, proxy server uploads it to specified Amazon S3 bucket for storage -5. Proxy server returns compressed image URL to Bandwidth Hero -6. Bandwidth Hero finds corresponding element on the page an updates its image source with compressed one -7. Browser loads compressed image from Amazon S3 bucket +3. Proxy server downloads the original image +4. Once image is downloaded it is then compressed to black and white +5. Proxy server returns compressed image to the browser ## Privacy Consideration -Please consider, that this extension has access to all the images you browse and stores compressed copies of them on my Amazon S3 bucket for up to 3 days. -If you don't want your images to be stored on some stranger's server, you can run your own proxy server. - -You will need a free Heroku account and an Amazon AWS account, -which is also available for free for up to one year, -and after that it costs just pennies per gigabyte of traffic. +Please note that proxy server does not store the images anywhere, it compresses them on the fly. +However if you want to be 100% sure you can run your own proxy server instance. Please refer to [Server Docs](https://github.com/ayastreb/bandwidth-hero/tree/master/server) for detailed instructions on how to run your own proxy. @@ -32,7 +26,6 @@ for detailed instructions on how to run your own proxy. ## Known Issues -* Doesn't work with `img srcset` and responsive images * Glitches on GMail & GoogleMaps ## Credits diff --git a/docs/workflow.png b/docs/workflow.png index 9e699be..16a900c 100644 Binary files a/docs/workflow.png and b/docs/workflow.png differ diff --git a/server/README.md b/server/README.md index a90ddcb..6881471 100644 --- a/server/README.md +++ b/server/README.md @@ -1,7 +1,25 @@ # Bandwidth Hero Server +This simple proxy server is written in Node.js + +It uses Express as a server and Sharp for images compression. + +You can run your own instance if you like to. + ## Deployment +* Clone Bandwidth Hero repository: + + ``` + git clone https://github.com/ayastreb/bandwidth-hero.git ./bandwidth-hero + ``` + +* Go to checked out directory: + + ``` + cd bandwidth-hero + ``` + * Download [Heroku toolbelt](https://toolbelt.heroku.com): * Login to your Heroku account: @@ -21,14 +39,3 @@ ``` git subtree push --prefix server heroku master ``` - -* Set Amazon S3 credentials: - - ``` - heroku config:set AWS_ACCESS_KEY_ID =xxx AWS_SECRET_ACCESS_KEY =yyy - ``` -* Set Amazon S3 bucket in which compressed images will be stored: - - ``` - heroku config:set S3_BUCKET = zzz - ```