Skip to content

Support glob pattern matching #18

Description

@kydecker

It would be awesome to add support for glob patterns that allow dynamically matching sets of files.

For example:

# optimize all gifs in the current directory
optimo *.gif

# optimize all gifs and pngs in the current directory
optimo *.{gif,png}

# optimize any images with the filename 'preview'
optimo preview.{avif,gif,jpg,jpeg,heic,png,webp}

Pattern-based glob matching would be especially helpful for running optimo during commits, for example, to make sure that any images added or modified in a codebase are optimized before being committed. (While not re-running optimo on files that haven't changed.)

Killer library, does exactly what I want and I'm already using it to save a ton of bandwidth for images on my portfolio. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions