Compress images with YAML

YAML parameters for Compress images

You can find the list with common parameters for all Buddy actions here.

NameTypeDescription
action
Required
StringThe ID of the action.
type
Required
StringThe type of the action. Should be set to IMAGE_COMPRESSION.
local_path
Required
StringThe path in the repository.
destination
Required
StringOutput directory for compressed images.
level
Required
StringThe level of image compression. Can be set to 1 (low), 2 (medium) or 3 (high).
types
Required
StringSupported image formats. Available types: jpg, png, gif, svg.
trigger_conditionStringDefines when the build action should be run. Can be one of ALWAYS, ON_CHANGE, ON_CHANGE_AT_PATH, VAR_IS, VAR_IS_NOT or VAR_CONTAINS.

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"
trigger_condition: "ALWAYS"