跳到主要内容

Compress images with YAML

List of YAML parameters and examples for the \"Compress images\" action

YAML parameters for Compress images

名称类型描述
action
必填
StringThe ID of the action.
type
必填
StringThe type of the action. Should be set to IMAGE_COMPRESSION.
local_path
必填
StringThe path in the repository.
destination
必填
StringOutput directory for compressed images.
level
必填
StringThe level of image compression. Can be set to 1 (low), 2 (medium) or 3 (high).
types
必填
StringSupported image formats. Available types: jpg, png, gif, svg.

YAML example for Compress images

actions:
- action: "Compress images"
type: "IMAGE_COMPRESSION"
local_path: "assets/"
destination: "compressed_images/"
level: "2"
types: "jpg,png,gif,svg"