It appears that the auto_pad crop mode is currently not implemented or not functioning as expected.
According to the Cloudinary documentation, the auto_pad mode requires the g_auto (gravity) qualifier, along with two of the following: h_ (height), w_ (width), or ar_ (aspect_ratio).
Consider the following example:
import { getCldImageUrl } from 'next-cloudinary';
const url = getCldImageUrl({
width: 960,
aspectRatio: '16:9',
crop: 'auto_pad',
gravity: 'auto',
src: '<Public ID>'
});
The generated URL from getCldImageUrl is missing the gravity and aspect_ratio parameters.
Additionally, the console outputs the following warning:
Auto gravity can only be used with crop modes: auto, crop, fill, lfill, fill_pad, thumb. Not applying gravity.
Support for the auto_pad mode would be highly desirable, as it is particularly useful for use cases like product images where maintaining multiple aspect ratios without cropping the subject is important.
It appears that the auto_pad crop mode is currently not implemented or not functioning as expected.
According to the Cloudinary documentation, the
auto_padmode requires theg_auto(gravity) qualifier, along with two of the following:h_(height),w_(width), orar_(aspect_ratio).Consider the following example:
The generated URL from getCldImageUrl is missing the gravity and aspect_ratio parameters.
Additionally, the console outputs the following warning:
Support for the auto_pad mode would be highly desirable, as it is particularly useful for use cases like product images where maintaining multiple aspect ratios without cropping the subject is important.