November 21, 2023

Perfect cut: smart image resizing with imgproxy

  • tutorial

A man practicing tameshigiri

Figure 0: Basic Gravity Types

Figure 1: Focus Point

A man with a cart
A man with a cart, target region
A man with a cart, cropped
Original image, focus point and the cropping region, cropped result. Source image by Mauro Lima.
resize:fill:1500:1500/gravity:fp:0.48:0.52

Figure 2: Default Smart Crop

A yellow bus
A yellow bus, target region
A yellow bus, cropped
Original image, the most attractive region judged by the default smart crop, and the final result. Source image by Nick Baker.
resize:fill:1500:1500/gravity:sm

Figure 3: Advanced Smart Crop (imgproxy Pro)

A man with a cart
A man with a cart, target region
A man with a cart, cropped
Original image, the most attractive region wrongly judged by the default smart crop, and the final result. Source image by Mauro Lima.
A man with a cart
A man with a cart, target region
A man with a cart, cropped
Original image, the cluster of important features detected by imgproxy Pro, and the final result. Source image by Mauro Lima.
resize:fill:1500:1500/gravity:sm

Figure 4: Advanced Smart Crop with Face Detection (imgproxy Pro)

A group of men wearing shirts
A group of men wearing shirts
A group of men wearing shirts
Original image, the cluster of important features detected without the face awareness, and the final result. Source image by Katyayan Gauniyal.
A group of men wearing shirts
A group of men wearing shirts
A group of men wearing shirts
Original image, faces detected by the cascade classifier, and the final result. Source image by Katyayan Gauniyal.

Figure 5: AI Object Detection (imgproxy Pro)

A model wearing sunglasses
A model wearing sunglasses
A model wearing sunglasses
Original image, the obscured face detected by AI, and the final result. Source image by Anastasia Nelen.
resize:fill:1500:1500/gravity:obj:face

Resizeable image

Start your free trial today:

Get imgproxy Pro on Cloud Marketplace: