Skip to content
Recipe template

When a Duplicator backup completes successfully, loop through media and optimize images with Smush

Compressing images changes files on disk, and cautious site owners want a fresh backup in place before any batch touches the media library, which means two manual jobs in the right order. When a Duplicator backup completes successfully, this recipe loops through the media library and has Smush optimize every image it has not optimized yet, so backup and compression always run in the safe order with nobody watching. On very large libraries, add a loop filter on the post date so each run only handles images uploaded in the last 30 days.

Runs for: everyone, including visitors

Free plugin40,000+ WordPress sitesno per-task fees

Uses two Pro conditions and a loop. The WordPress Core condition, the Smush condition, and loops are part of Automator Pro. Install the free plugin first; Pro adds on top.
Trigger Duplicator Lite
A backup completes with a specific status
Loop Posts that match the following criteria
Pro
  • A post is a specific type of post
  • An image is/is not optimized
Action Smush Lite
Optimize an image

A recipe is a deterministic automation: a trigger, optional conditions, and the actions that run when it fires, the same way every time. Built with your AI or by hand; runs without it.

How to use this template

Get this recipe on your site in three steps

  1. Install Uncanny Automator free

    In WordPress go to Plugins > Add New, search for Uncanny Automator, then install and activate. The plugin is free.

    Start free
  2. Import the template

    Go to Automator > Recipe templates, search “Duplicator” and click Import recipe to your site. It opens as a draft, with Install and Connect buttons if Duplicator or Smush is missing.

    Pro Needs Automator Pro. See plans
  3. Choose your settings and go live

    Pick the settings for the Duplicator trigger, the WordPress Core condition, the Smush condition, and the Smush action, then switch the recipe from Draft to Live. From now on it runs on its own, and every run is in the log.

Connect in 60 seconds

Or build it by asking your AI

Connect ChatGPT, Claude, Gemini or any AI to your site, then paste the prompt. Your AI writes the recipe through Uncanny Automator’s MCP server and saves it as a draft you can open and edit. Built with AI. Runs without it.

Works with ChatGPT Claude Gemini Copilot Perplexity

and any AI app that supports remote MCP servers

Works on the free plan, up to 150 tool uses a day.

Build this with your AI · paste into your AI app

When a Duplicator backup completes successfully, loop through media and optimize images with Smush. Save it as a recipe and leave it in draft so I can review it.

Your AI finds the Duplicator trigger, the WordPress Core condition, the Smush condition, and the Smush action, fills the fields, and hands you a link to open the draft in the builder. The WordPress Core condition, the Smush condition, and loops still need Automator Pro to run.

No AI subscription? Uncanny Agent is built in.

New here?

What is Uncanny Automator?

Uncanny Automator connects your AI to your WordPress site, so you can manage and automate the site with the AI you already use. It is an MCP server for WordPress with a built-in automation engine: ChatGPT, Claude, Gemini, Copilot, Perplexity or any AI app that supports remote MCP servers can act across every plugin and app on your site, and any task becomes a recipe that keeps running after the chat ends.

Manage your site with AI

Free, up to 150 tool uses a day. Posts, pages, users, orders, settings and the plugins you run.

The WordPress MCP server

Automations that keep working after the chat ends

Recipes like this one: built with your AI or in the visual builder, deterministic, editable, with every run logged.

Automations

Your plugins and apps, connected

Hundreds of WordPress plugins and apps working together, with no per-task fees.

Integrations

Lite is free for as long as you like. Pro adds every trigger, action and token plus conditions, queues, schedules, loops and data tools.

FAQ

Questions, answered

Something else? Read the full FAQ or browse the knowledge base.

Is this template free?

Installing Uncanny Automator is free, and the Duplicator trigger and the Smush action in this recipe are included in Lite. The WordPress Core condition, the Smush condition, and loops are part of Automator Pro, so this recipe needs Pro to go live.

What is a recipe?

A recipe is a deterministic automation: one or more triggers, optional conditions, and the actions that run when they fire, running the same way every time. Built with your AI or by hand; runs without it. More about automations

What is an MCP server?

An MCP server is how AI apps such as ChatGPT or Claude connect to other software. Uncanny Automator is an MCP server for WordPress with a built-in automation engine: it connects your AI to your WordPress site, so you can manage and automate the site with your AI. The WordPress MCP server

Does the recipe need my AI to stay connected?

No. Your AI writes the recipe; Uncanny Automator runs it every time the trigger fires, whether or not an AI is connected. Built with AI. Runs without it.

Can I change the template after importing it?

Yes. It is an ordinary recipe in the visual builder: edit any field, add actions, pause it, duplicate it, and read every run in the log.

What if I don't have an AI subscription?

Import the template or build the recipe by hand in the visual builder. Uncanny Agent is also built in if you want an assistant without setting anything up.

Does it work with something other than Smush?

Yes. The same Duplicator trigger also works with Slack, Webhooks, and WPCode: see the related templates below. Or browse every Duplicator template and the integrations directory.

Get started

Get this recipe running today

Free plugin, and the recipe is yours to edit. Import the template, or connect your AI and ask for it.

This page may contain affiliate links. Once in a while, we may earn a commission from those links. But with or without commissions, we only recommend products we like.
Back To Top