# Optimize images and alt text with Antigravity

> Use Google Antigravity with StoreSEO to find heavy product images, then compress them and write alt text and file names one image at a time with approval.

Optimizing your Shopify images in Antigravity means asking Google's agentic IDE to find heavy or unlabelled images through StoreSEO and optimize them one image at a time, with Ask mode prompting before each tool runs.

## How do you set up Antigravity for this?

### 1. Add StoreSEO in View raw config

In the Antigravity IDE open the menu in the agent side panel, choose MCP Servers, then Manage MCP Servers, then View raw config. Paste this into mcp_config.json and save. The field is serverUrl: Antigravity does not support url or httpUrl for remote servers.

```json
{
  "mcpServers": {
    "storeseo": {
      "serverUrl": "https://mcp.storeseo.com/mcp"
    }
  }
}
```

### 2. Sign in, then check the connection

Open Agent settings (Cmd+, on Mac, Ctrl+, on Windows and Linux), go to Customizations and click Authenticate next to storeseo. Pick your Shopify store and approve in the browser, copy the authorization code it shows, paste it into the settings panel and click Submit. Then ask this in the agent panel.

```text
Use StoreSEO to show me my store's SEO score breakdown.
```

### 3. Or connect with an access token (optional)

If you cannot use the browser sign-in, generate a token in StoreSEO under Settings, AI Toolkit and add it as a header. Keep mcp_config.json out of a public repository when it holds a token.

```json
{
  "mcpServers": {
    "storeseo": {
      "serverUrl": "https://mcp.storeseo.com/mcp",
      "headers": { "Authorization": "Bearer YOUR_TOKEN" }
    }
  }
}
```

Then ask: "Use StoreSEO to list my ten heaviest unoptimized product images and tell me the quota compression would use."

## How does this work in Antigravity?

You have Antigravity open on your theme with the agent side panel showing the storeseo server, which you added with the serverUrl field in mcp_config.json and signed in by pasting back an authorization code. You ask the agent for the ten heaviest product images that are not compressed. It calls storeseo_start, then storeseo_list_images, and the reply lists each image's compression, alt text and file name status and the count of axes done. Tools you have not configured run in Ask mode, so expect an approval prompt before each of those calls.

That prompt matters most when you move from listing to changing. The agent should name the number of images and the spend before it starts: compression uses the Image Optimizer add-on quota, while alt text and file names use AI Content Optimizer credit. Each storeseo_optimize_image call handles one image with the axes you chose, so a batch is a series of prompts, and the report for each call says applied, already applied, skipped or refused. If you have no add-on, compression is refused while alt text and file names still apply, and the agent should say so.

Because the agent also edits your theme, a rename can be followed through in the same window. The new file name gives the image a new storefront URL, which is in the report, and the agent can search the project for the old name and propose edits. If a result is wrong, ask for a restore of the axis and the agent calls storeseo_restore_image. For audit-only sessions, an mcp(storeseo/storeseo_list_images) policy pattern can allow the read while the optimize tool stays in Ask mode.

### Example session (illustrative)

**You:** Which product images are heaviest and not compressed yet?
→ `storeseo_start` (read-only)
→ `storeseo_list_images` (read-only)
**Agent:** Ten images found, the largest 3.6 MB on Canvas Tote. Compression uses Image Optimizer quota, one call per image. Shall I compress the three largest?
**You:** Yes, compression only.
→ `storeseo_optimize_image` (needs approval)
**Agent:** First image compressed. Antigravity will ask again before the next one.

## What StoreSEO does: image seo and alt text

StoreSEO tracks three things per image: file-size compression, alt text and file name. The agent finds the heaviest or unlabelled images, optimizes them one call per image, and can restore any of the three if you do not like the result.

Tools: `storeseo_list_images`, `storeseo_optimize_image`, `storeseo_restore_image`

Requires: Compression needs the Image Optimizer add-on and counts against its monthly quota; alt text and file names spend AI Content Optimizer credit.

1. **Find the images.** The agent lists product, collection or article images, heaviest unoptimized first by default. It can filter to images with no alt text, or scope the list to one product by title.
2. **Check what it found.** A title search can also match image file names from other resources, so the agent checks each row belongs to the product you meant.
3. **Agree the scope and cost.** Compression uses image quota and alt text and file names use AI credit, so the agent confirms before working through many images.
4. **Optimize one image per call.** Each call takes the axes you want: compression, alt text, file name or all three. The axes always run compression, then file name, then alt text, and the response reports each one separately.
5. **Report or restore.** The agent reports what applied, what was already done and what was refused. If a result is wrong, the restore tool brings back the original file, alt text or name.

## Image SEO and alt text reference

| Setting or limit | What applies |
|---|---|
| Axes per image | Compression, alt text, file name |
| Image sources | Products, collections and articles (pages have no images) |
| Batching | One image per call; never two calls on the same image at once |
| Compression | Image Optimizer add-on and its monthly quota; an already compressed image is reported as already applied |
| Alt text and file name | AI Content Optimizer credit; both together are billed as one generation |
| File name change | Renames the file on Shopify and changes the image's storefront URL |
| Collection and article renames | Re-upload the image, so the call can take a couple of minutes |
| Restore | Reverts compression, alt text or file name per axis |
| Score impact | Alt text and file names count on products, collections and articles; compression counts on products |

## Rules Antigravity follows

- The agent confirms the number of images and the kind of spend before a bulk run.
- One image per call, all wanted axes together; never parallel calls on the same image.
- A renamed image has a new URL, so the agent tells you, because anything that hard-coded the old URL keeps serving the old file.
- If a response is lost, the agent re-lists the image instead of retrying, because a retry regenerates and spends again.
- A refused axis, for example compression without the add-on, is reported as such while the other axes still apply.

**In Antigravity:** If you add a policy that allows mcp(storeseo/*), Antigravity stops asking and the confirmation StoreSEO tells the agent to ask for is the only check before an image is compressed, captioned or renamed, so allow the listing tool by name instead. The server entry must use serverUrl, because Antigravity's documentation says url and httpUrl are not supported, and the sign-in ends with a code you paste into Agent settings, under Customizations.

## What can you ask Antigravity to do?

- Use StoreSEO to list my ten heaviest unoptimized product images and tell me the quota compression would use.
- Which product images have no alt text? Show me the list before you write anything.
- Optimize the images on the product Canvas Tote, then search this project for the old image file names.
- Find my ten heaviest unoptimized product images and compress them. Tell me the quota it will use first.
- Which product images have no alt text at all? Write alt text for the ones on my best seller.
- Optimize every image on the product Canvas Tote: compression, alt text and file name.
- Restore the original alt text on the last image you changed.
- Give my collection images descriptive file names, and warn me which URLs will change.

## Frequently asked questions

### Will Antigravity ask before it compresses an image?

By default, MCP tools you have not configured run in Ask mode, so Antigravity asks before each call. If you allow a tool with an mcp policy pattern, that tool stops prompting, so allow only the read tool.

### Why can Antigravity not find the StoreSEO image tools?

Check that the entry in mcp_config.json uses serverUrl and not url, and that you finished the sign-in by pasting the authorization code in Agent settings. Then list the tools again.

### Can the agent compress images without the Image Optimizer add-on?

No. Compression needs the Image Optimizer add-on and counts against its monthly quota. Alt text and file names work without it and spend AI Content Optimizer credit instead.

### Can I undo an image optimization?

Yes. The restore tool reverts compression, alt text or file name for one image, per axis. Restoring compression brings back the original file.

### Why did my image URL change?

Giving an image a new file name renames the file on Shopify and re-points its storefront URL. Pages that use the image through Shopify keep working, but anything that hard-coded the old URL keeps the old file.

### Can I write my own file name or alt text through the agent?

No. StoreSEO writes the alt text and file name from the resource's own context. You can steer the language, and you can always edit alt text yourself in Shopify admin.

## Image SEO and alt text with other agents

- [Optimize images and alt text with Claude](https://storeseo.com/agent/claude/image-seo)
- [Optimize images and alt text with ChatGPT](https://storeseo.com/agent/chatgpt/image-seo)
- [Optimize images and alt text with Claude Code](https://storeseo.com/agent/claude-code/image-seo)
- [Optimize images and alt text with Claude Cowork](https://storeseo.com/agent/claude-cowork/image-seo)
- [Optimize images and alt text with Cursor](https://storeseo.com/agent/cursor/image-seo)
- [Optimize images and alt text with Codex](https://storeseo.com/agent/codex/image-seo)
- [Optimize images and alt text with Gemini CLI](https://storeseo.com/agent/gemini-cli/image-seo)
- [Optimize images and alt text with GitHub Copilot](https://storeseo.com/agent/github-copilot/image-seo)
- [Optimize images and alt text with Windsurf](https://storeseo.com/agent/windsurf/image-seo)
- [Optimize images and alt text with Grok](https://storeseo.com/agent/grok/image-seo)
- [Optimize images and alt text with ChatGPT dots](https://storeseo.com/agent/chatgpt-dots/image-seo)
- [Optimize images and alt text with Grok Bot](https://storeseo.com/agent/grok-bot/image-seo)
- [Optimize images and alt text with Muse](https://storeseo.com/agent/muse/image-seo)
- [Optimize images and alt text with Manus](https://storeseo.com/agent/manus/image-seo)
- [Optimize images and alt text with OpenClaw](https://storeseo.com/agent/openclaw/image-seo)
- [Optimize images and alt text with Hermes Agent](https://storeseo.com/agent/hermes-agent/image-seo)
- [Optimize images and alt text with Paperclip](https://storeseo.com/agent/paperclip/image-seo)
- [Optimize images and alt text with NanoClaw](https://storeseo.com/agent/nanoclaw/image-seo)
- [Optimize images and alt text with OpenCode](https://storeseo.com/agent/opencode/image-seo)
- [Optimize images and alt text with Zed](https://storeseo.com/agent/zed/image-seo)
- [Optimize images and alt text with Kiro](https://storeseo.com/agent/kiro/image-seo)
- [Optimize images and alt text with Kimi Code](https://storeseo.com/agent/kimi/image-seo)

## More Antigravity guides

- [Antigravity and StoreSEO overview](https://storeseo.com/agent/antigravity)
- [Audit your store's SEO with Antigravity](https://storeseo.com/agent/antigravity/seo-audit)
- [Optimize meta tags and content with Antigravity](https://storeseo.com/agent/antigravity/optimize-meta)
- [Get products ready for AI search with Antigravity](https://storeseo.com/agent/antigravity/ai-search-readiness)
- [Publish llms.txt and agents.md with Antigravity](https://storeseo.com/agent/antigravity/llms-txt-agents-md)
- [Set up structured data with Antigravity](https://storeseo.com/agent/antigravity/structured-data)
- [Manage sitemaps and indexing with Antigravity](https://storeseo.com/agent/antigravity/sitemaps)
- [Track keyword rankings with Antigravity](https://storeseo.com/agent/antigravity/keyword-tracking)
- [Read Search Console and Analytics with Antigravity](https://storeseo.com/agent/antigravity/google-reports)
- [Write SEO blog post drafts with Antigravity](https://storeseo.com/agent/antigravity/blog-posts)

## Related documentation

- [How to use the StoreSEO image optimizer](https://storeseo.com/docs/how-to-use-storeseo-image-optimizer-on-shopify)
- [Generate and add image alt text with AI](https://storeseo.com/docs/generate-and-add-image-alt-text-with-ai)
- [Monthly usage limit for the image optimizer](https://storeseo.com/docs/monthly-usage-limit-for-image-optimizer)
- [Add the image optimizer to your plan](https://storeseo.com/docs/how-to-add-image-optimizer-to-your-subscription-plan)

---

Canonical: https://storeseo.com/agent/antigravity/image-seo
Last updated: October 2026.

Approval: Reads run straight away; StoreSEO tells the agent to preview and wait for your yes before it writes, spends credit or publishes, and your client's tool-approval setting is the hard stop.

Every agent guide: https://storeseo.com/agent · Connect the MCP server: https://storeseo.com/docs/connect-storeseo-mcp-to-your-ai-assistant · Pricing: https://storeseo.com/pricing · Install StoreSEO: https://apps.shopify.com/storeseo
