Level of CPU effort to reduce file size, 0-100. PNG, WebP, and AVIF only. Supported only when a Sharp encoder is provided. Default: auto.
Instance of the Sharp encoder, which must be installed from the 'sharp' package and provided by the caller. When not provided, a platform-specific fallback implementation will be used, and most quality- and compression-related options are ignored.
Pattern matching the format(s) to be compressed or converted. Some examples of formats include "jpeg" and "png".
Attempts to avoid processing images that could exceed memory or other other limits, throwing an error instead. Default: true.
Use lossless compression mode. WebP and AVIF only. Supported only when a Sharp encoder is provided. Default: false.
Use near lossless compression mode. WebP only. Supported only when a Sharp encoder is provided. Default: false.
Pattern identifying textures to compress, matched to name or URI.
Quality, 1-100. Default: auto.
Resizes textures to given maximum width/height, preserving aspect ratio. For example, a 4096x8192 texture, resized with limit [2048, 2048] will be reduced to 1024x2048.
Presets "nearest-pot", "ceil-pot", and "floor-pot" resize textures to power-of-two dimensions, for older graphics APIs including WebGL 1.0.
Interpolation used if resizing. Default: TextureResizeFilter.LANCZOS3.
Pattern matching the material texture slot(s) to be compressed or converted. Some examples of slot names include "baseColorTexture", "occlusionTexture", "metallicRoughnessTexture", and "normalTexture".
Target image format. If specified, included textures in other formats will be converted. Default: original format.
Made by Don McCurdy. Documentation built with greendoc and published under Creative Commons Attribution 3.0.