auto method
The auto function lets you enable the functionality that automates certain image optimization features. As of now, there is only one possible value for this field, i.e., webp. When the auto parameter is set to webp, it enables WebP image support. WebP images have higher compression rate with minimum loss of quality.
For more details, Read documentation: https://www.contentstack.com/docs/developers/apis/image-delivery-api/#automate-optimization
Example:
final stack = contentstack.Stack(apiKey, deliveryToken, environment);
final imageTransformation = stack.imageTransform(imageUrl);
await imageTransformation.auto(auto: 'webp', format: 'pjpg').fetch();
Implementation
void auto({String auto, String format}) {
if (auto != null) {
query.append('auto', auto);
}
if (format != null) {
query.append('formate', format);
}
}