人々は主に縦方向に長方形であり、出会い系サービスのための自分の写真は適切なものを撮り、デザイナーは小さな正方形を望み、nginxは人々が興味を持っているものではなく人々に切り取ります(私は顔を意味します)。 longcatの例を使用すると、次のようなものが得られます。

あなたは通常の方法でこれと一緒に暮らす必要があります:それを取り、自分でそれを終了します。 その結果、image_filterモジュール用のパッチを入手しました。これは、クロップが発生したときに、画像のどちらの側でエッジを切り取る必要がないかを示すことができます。 githubですべて良好です。
カスタマイズ
簡単です。必要な場所またはサーバーにディレクティブを入力する必要があります。
image_filter_offset {left,center,right} {top,center,bottom};
良い例
縦の写真
オリジナル:

上部の配置:
image_filter_offset center top;

中央揃え(通常の動作):
image_filter_offset center center;

下揃え:
image_filter_offset center bottom;

横の写真
オリジナル:

image_filter_offset left center;
:
image_filter_offset left center;

中央揃え(通常の動作):
image_filter_offset center center;

image_filter_offset right center;
:
image_filter_offset right center;

見逃した方へ: githubへのリンク 。