quality method
- int quality
The quality function lets you control the compression level of images that have Lossy file format. The value for this parameters can be entered in any whole number (taken as a percentage) between 1 and 100. The lower the number, the smaller will be file size and lower quality, and vice versa. If the source image file is not of Lossy file format, this parameter will be ignored.
For more details, Read documentation: https://www.contentstack.com/docs/developers/apis/image-delivery-api/#quality
Example:
final stack = contentstack.Stack(apiKey, deliveryToken, environment);
final imageTransformation = stack.imageTransform(imageUrl);
final response = await imageTransformation.quality(2).fetch();
Implementation
void quality(int quality) {
query.append('quality', quality.toString());
}