An injectable strategy which is used to determine the parameters for transforming an image. This can be used to implement custom image transformation logic, for example to limit transform parameters to a known set of presets.
This is set via the imageTransformStrategy option in the AssetServerOptions. Multiple
strategies can be defined and will be executed in the order in which they are defined.
If a strategy throws an error, the image transformation will be aborted and the error will be logged, with an HTTP 400 response sent to the client.
InjectableStrategy(args: GetImageTransformParametersArgs) => Promise<ImageTransformParameters> | ImageTransformParametersGiven the input parameters, return the parameters which should be used to transform the image.
Parameters which are used to transform the image.
number | undefinednumber | undefinedImageTransformMode | undefinednumber | undefinedImageTransformFormat | undefinednumber | undefinednumber | undefinedstring | undefinedstring | undefinedv3.8.0A hex color string (e.g. '#ffffff') to be used as the background color
for images with alpha transparency. The alpha channel will be merged with
this color using Sharp's flatten() method.
The arguments passed to the getImageTransformParameters method of an ImageTransformStrategy.
RequestImageTransformPreset[]ImageTransformParameters