Skip to content

Using this nginx config we can check a type of users device (iPhone, iPod, iPad, Android mobile, Android tablet), proportionaly increase the size of requested image and cache it.

Notifications You must be signed in to change notification settings

Ardem/nginx-mobile-resize-conf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

About

Using this nginx config we can check a type of users device (iPhone, iPod, iPad, Android mobile, Android tablet), detect an original size of requested image, proportionaly increase this image, cache it and return to the client.

Dependencies for nginx

  1. ngx_http_image_filter_module http://nginx.org/en/docs/http/ngx_http_image_filter_module.html
  2. ngx_let_module https://github.com/arut/nginx-let-module
  3. ngx_eval_module https://github.com/vkholodkov/nginx-eval-module

Configure nginx

./configure --with-http_image_filter_module --add-module=/path/to/ngx_let_module --add-module=/path/to/ngx_eval_module

If you will see an error message "all warnings being treated as errors" from gcc for ngx_eval_module during the "Make" process, use this solution http://stackoverflow.com/questions/5451237/nginx-0-9-6-frustrating-compile-issues-ubuntu-gcc-4-6-1.

About

Using this nginx config we can check a type of users device (iPhone, iPod, iPad, Android mobile, Android tablet), proportionaly increase the size of requested image and cache it.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published