AVIF Converter For Mac

In 2025, Webflow added an image optimiser to its asset panel that converts files into AVIF format. A nice feature, but it didn’t quite align with how I prefer to work.

Personally, I prefer to optimise images before uploading which brought me to this neat little challenge. What's the quickest way to optimise images, which doesn't cost anything or takes too much time?

Prerequisite

You'll need Python and Homebrew installed on your Mac, along with the avifenc encoder. After you’ve got those, you won’t need to touch Terminal again.

Mac Quick Actions

After some quick research I discovered macOS Quick Actions, a built-in tool that lets you run custom scripts from Finder. It felt like a clean, lightweight way to handle image conversion without relying on external services.

Quick actions are extremely powerful and this version only took 2 minutes to setup.

How To Make The Tool

  1. On your Desktop, make a folder called: AVIF OUT
  2. Open AutomatorNew Document → choose Quick Action
  3. At the top set:
    • Workflow receives current: image files
    • in: Finder
  4. Add a Run Shell Script action
    • Shell: /bin/zsh
    • Pass input: as arguments
  5. Paste this script:
    # Quick Action: Convert images to AVIF into ~/Desktop/AVIF OUT and reveal folder
    OUTDIR="$HOME/Desktop/AVIF OUT"
    mkdir -p "$OUTDIR"
    
    # Find avifenc (Apple Silicon + Intel brew installs)
    AVIFENC="$(command -v avifenc || true)"
    if [ -z "$AVIFENC" ]; then
      [ -x /opt/homebrew/bin/avifenc ] && AVIFENC=/opt/homebrew/bin/avifenc
      [ -z "$AVIFENC" ] && [ -x /usr/local/bin/avifenc ] && AVIFENC=/usr/local/bin/avifenc
    fi
    
    if [ -z "$AVIFENC" ]; then
      echo "avifenc not found. Install with: brew install libavif"
      exit 1
    fi
    
    # Encoding presets
    MIN=20   # lower number = higher quality
    MAX=30   # lower number = higher quality
    SPEED=6  # 0=slow/best, 10=fastest
    
    for f in "$@"; do
      [ -f "$f" ] || continue
    
      base="$(basename "$f")"
      name="${base%.*}"
    
      # only process common formats
      ext="${base##*.}"
      ext="${ext:l}"  # lowercase
      case "$ext" in
        jpg|jpeg|png|heic|tif|tiff|bmp|gif|webp)
          out="$OUTDIR/$name.avif"
    
          # avoid overwriting existing files
          i=1
          while [ -e "$out" ]; do
            out="$OUTDIR/${name} ($i).avif"
            i=$((i+1))
          done
    
          "$AVIFENC" --min "$MIN" --max "$MAX" --speed "$SPEED" "$f" "$out" || {
            echo "Failed to convert: $f"
            continue
          }
    
          ;;
        *)
          ;;
      esac
    done
    
    # Reveal the AVIF OUT folder in Finder
    open "$OUTDIR"
  6. FileSave

How To Use It

Right-click any image → Quick ActionsConvert to AVIF.

The converted file will appear in the folder on your desktop, as simple as that. It also works if you select multiple images at once. Neat, right?

There are tons of ways you could extend this tool. For example, deleting the original image to save space, drag and drop instead of right click or even something direct from Figma.

I wanted something quick and easy, nothing fancy, so if you build on this, send me your tweaks on Instagram. I’d love to see what you create.