Skip to content

Nginx image_filter module with ability to add placement for cropped images.

Notifications You must be signed in to change notification settings

bobrik/nginx_image_filter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 

Repository files navigation

nginx image_filter

This is basically the same image_filter module, but with ability to place cropped images.

Goals

Humans usually have faces at the top of their photos, but nginx always crop image to center. We needed to make it more flexible.

Configuration

This module has additional configuration option:

image_filter_crop_offset {left,center,right} {top,center,bottom};

Examples

Vertical images

  • Original image

Original vertical image

  • Crop and align to top: image_filter_crop_offset center top;

Aligned to top vertical image

  • Crop and align to center (original behavior): image_filter_crop_offset center center;

Aligned to center vertical image

  • Crop and align to bottom: image_filter_crop_offset center bottom;

Aligned to bottom vertical image

Horizontal images

  • Original image

Original horizontal image

  • Crop and align to left: image_filter_crop_offset left center;

Aligned to left horizontal image

  • Crop and align to center (original behavior): image_filter_crop_offset center center;

Aligned to center horizontal image

  • Crop and align to right: image_filter_crop_offset right center;

Aligned to right horizontal image

Authors

About

Nginx image_filter module with ability to add placement for cropped images.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages