PHPackages                             travelopia/wordpress-ai - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. travelopia/wordpress-ai

ActiveWordpress-plugin[Utility &amp; Helpers](/categories/utility)

travelopia/wordpress-ai
=======================

0.1.1(2mo ago)314[3 PRs](https://github.com/Travelopia/wordpress-ai/pulls)PHPPHP ^8.3CI passing

Since Mar 24Pushed 2w ago1 watchersCompare

[ Source](https://github.com/Travelopia/wordpress-ai)[ Packagist](https://packagist.org/packages/travelopia/wordpress-ai)[ RSS](/packages/travelopia-wordpress-ai/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (3)Dependencies (22)Versions (6)Used By (0)

Travelopia WordPress AI
=======================

[](#travelopia-wordpress-ai)

[![maintenance-status](https://camo.githubusercontent.com/cfed6dc6fddd5928206fc6563093b42c7fe0743e15681325f9f06dad017ed885/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6d61696e74656e616e63652d6163746976656c792d2d646576656c6f7065642d627269676874677265656e2e737667)](https://camo.githubusercontent.com/cfed6dc6fddd5928206fc6563093b42c7fe0743e15681325f9f06dad017ed885/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6d61696e74656e616e63652d6163746976656c792d2d646576656c6f7065642d627269676874677265656e2e737667)

An extensible WordPress plugin that brings AI capabilities to your content workflows. Configure your preferred AI provider once, and unlock a growing set of features — starting with automatic image alt text generation.

  Built by the super talented team at **[Travelopia](https://www.travelopia.com/work-with-us/)**.

   [![](https://camo.githubusercontent.com/b6d2c5265f0a72e4cab9dc3a452c4c479ac298969d9aa08afca93ceb681c39a3/68747470733a2f2f7777772e74726176656c6f7069612e636f6d2f77702d636f6e74656e742f7468656d65732f74726176656c6f7069612f7372632f6173736574732f7376672f6c6f676f2d74726176656c6f7069612d636972636c652e737667)](https://camo.githubusercontent.com/b6d2c5265f0a72e4cab9dc3a452c4c479ac298969d9aa08afca93ceb681c39a3/68747470733a2f2f7777772e74726176656c6f7069612e636f6d2f77702d636f6e74656e742f7468656d65732f74726176656c6f7069612f7372632f6173736574732f7376672f6c6f676f2d74726176656c6f7069612d636972636c652e737667)  Installation
------------

[](#installation)

```
composer require travelopia/wordpress-ai

```

AI Providers
------------

[](#ai-providers)

The plugin supports multiple providers out of the box:

- **AWS Bedrock** (default)
- **OpenAI**

### Provider Configuration

[](#provider-configuration)

**AWS Bedrock** (Claude 3.5 Sonnet) — set via `wp-config.php` or environment variable:

```
define( 'AWS_BEDROCK_API_KEY', 'your-key-here' );
define( 'AWS_BEDROCK_REGION', 'us-east-1' ); // optional, defaults to us-east-1
```

```
export AWS_BEDROCK_API_KEY="your-key-here"
export AWS_BEDROCK_REGION="us-east-1" # optional, defaults to us-east-1
```

**OpenAI** (GPT-4o Mini) — set via `wp-config.php` or environment variable:

```
define( 'OPENAI_API_KEY', 'your-key-here' );
```

```
export OPENAI_API_KEY="your-key-here"
```

Features
--------

[](#features)

### Alt Text Generation

[](#alt-text-generation)

Automatically generates descriptive alt text for images — improving accessibility and SEO with zero manual effort.

- **Auto-generate on upload** — alt text is filled in the moment an image hits the Media Library
- **Generate for existing images** — click "Generate Alt Text" from the attachment edit screen
- **Batch processing via WP-CLI** — backfill alt text for your entire media library
- **Respects manual alt text** — never overwrites unless you explicitly regenerate
- **Customizable prompt** — tailor the generation instructions from the settings page

WP-CLI examples:

```
wp travelopia-wp-ai alt-text generate --missing                    # only images without alt text
wp travelopia-wp-ai alt-text generate --all                        # every image
wp travelopia-wp-ai alt-text generate --ids=1,2,3                  # specific attachments
wp travelopia-wp-ai alt-text generate --all --batch-size=20        # smaller batches for memory-constrained envs
wp travelopia-wp-ai alt-text generate --missing --limit=1000       # cost / quality sample — stop after 1000 attempts
wp travelopia-wp-ai alt-text generate --missing --limit=5000       # chunked nightly backfill — re-runs continue naturally
```

The `--limit=` flag caps the total number of attempts in a single run (success or failure). It composes with `--missing`, `--all`, `--ids`, and `--batch-size`. With `--ids`, the supplied list is truncated to the first N entries. With `--all`, the run is **not resumable** — successive invocations reprocess the same first N images; use `--missing` for chunked backfills.

Hooks
-----

[](#hooks)

### Filters

[](#filters)

**`travelopia_wordpress_ai_provider`** — Switch the active AI provider.

```
add_filter(
	'travelopia_wordpress_ai_provider',
	fn() => 'openai'
);
```

---

**`travelopia_wordpress_ai_alt_text_generation_options`** — Override model, temperature, or system instruction for alt text generation.

```
add_filter(
	'travelopia_wordpress_ai_alt_text_generation_options',
	function ( array $options, int $attachment_id ): array {
		$options['model']              = 'anthropic.claude-3-5-sonnet-20241022-v2:0';
		$options['temperature']        = 0.5;
		$options['system_instruction'] = 'You are an accessibility expert.';
		return $options;
	},
	10,
	2
);
```

---

**`travelopia_wordpress_ai_alt_text_include_context`** — By default, the plugin sends the image title and filename as additional context alongside the image to help the AI produce more accurate alt text. Set this to `false` to send only the image itself.

```
add_filter(
	'travelopia_wordpress_ai_alt_text_include_context',
	'__return_false'
);
```

---

**`travelopia_wordpress_ai_settings_capability`** — Control which user role can access the plugin settings page. Defaults to `manage_options` (Administrator).

```
add_filter(
	'travelopia_wordpress_ai_settings_capability',
	fn() => 'edit_posts'
);
```

### Actions

[](#actions)

**`travelopia_wordpress_ai_alt_text_generated`** — Fired after alt text is successfully generated for an attachment.

```
add_action(
	'travelopia_wordpress_ai_alt_text_generated',
	function ( int $attachment_id, string $alt_text ): void {
		// Log, notify, or post-process.
	},
	10,
	2
);
```

---

**`travelopia_wordpress_ai_bedrock_error`** / **`travelopia_wordpress_ai_open_ai_error`** — Fired when a provider encounters an error during generation.

```
add_action(
	'travelopia_wordpress_ai_bedrock_error',
	function ( string $code, string $message, array $data ): void {
		// Handle error.
	},
	10,
	3
);
```

Local Development
-----------------

[](#local-development)

Requires [Docker](https://www.docker.com/products/docker-desktop/) to be installed and running.

```
npm run start            # install deps and start the dev environment
npm run wp-env:start     # start the dev environment (without installing deps)
npm run wp-env:stop      # stop the dev environment
npm run test:php:setup   # install deps in container and run PHP tests (first run)
npm run test:php         # run PHP tests
```

Privacy
-------

[](#privacy)

Images are sent to your configured AI provider for analysis when generating alt text.

###  Health Score

42

—

FairBetter than 89% of packages

Maintenance92

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~26 days

Total

2

Last Release

64d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0bf9aa73e644a98de79d8912e156611542decabeca6e698642ede6dc374d6fcb?d=identicon)[travelopia](/maintainers/travelopia)

![](https://www.gravatar.com/avatar/6593fc8d9fcce38fc34d99dbe429ad0529d7233320a3cdff669c08a12d12e1e3?d=identicon)[ashishr007tp](/maintainers/ashishr007tp)

![](https://www.gravatar.com/avatar/765426ed878f457c97691b3a13db1b731e9dee22fde3d3254f7613465d6203d2?d=identicon)[jigneshbhavani](/maintainers/jigneshbhavani)

![](https://www.gravatar.com/avatar/c36bf9cb862da131cdc085cbccc975ce9a7c4a0568722b55ea4b2d4379cf6d94?d=identicon)[roshniahuja](/maintainers/roshniahuja)

![](https://www.gravatar.com/avatar/4263f0ee57b1f7f05da9f59c11dcb6bd7d3610249071fb8652405f8dd372bfa2?d=identicon)[monikabharti](/maintainers/monikabharti)

![](https://www.gravatar.com/avatar/d4eed0ccb070bf558e5a74b50271ef5cc4b612ffe5a26c90d33b7b1ce13bd008?d=identicon)[junaidtravelopia](/maintainers/junaidtravelopia)

---

Top Contributors

[![junaid-travelopia](https://avatars.githubusercontent.com/u/242569587?v=4)](https://github.com/junaid-travelopia "junaid-travelopia (53 commits)")[![jignesh-travelopia](https://avatars.githubusercontent.com/u/113992677?v=4)](https://github.com/jignesh-travelopia "jignesh-travelopia (36 commits)")[![actuallyakash](https://avatars.githubusercontent.com/u/18614782?v=4)](https://github.com/actuallyakash "actuallyakash (21 commits)")[![Vrishabhsk](https://avatars.githubusercontent.com/u/71686151?v=4)](https://github.com/Vrishabhsk "Vrishabhsk (19 commits)")[![rutviksavsani](https://avatars.githubusercontent.com/u/53530700?v=4)](https://github.com/rutviksavsani "rutviksavsani (15 commits)")[![vampdroid](https://avatars.githubusercontent.com/u/55312427?v=4)](https://github.com/vampdroid "vampdroid (9 commits)")[![tanya-verma-travelopia](https://avatars.githubusercontent.com/u/170601589?v=4)](https://github.com/tanya-verma-travelopia "tanya-verma-travelopia (1 commits)")

---

Tags

aiwordpress-plugin

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/travelopia-wordpress-ai/health.svg)

```
[![Health](https://phpackages.com/badges/travelopia-wordpress-ai/health.svg)](https://phpackages.com/packages/travelopia-wordpress-ai)
```

###  Alternatives

[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k496.1k33](/packages/neuron-core-neuron-ai)[roundcube/roundcubemail

The Roundcube Webmail suite

7.0k1.4k3](/packages/roundcube-roundcubemail)[spatie/laravel-export

Create a static site bundle from a Laravel app

672139.5k6](/packages/spatie-laravel-export)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9317.2k55](/packages/open-dxp-opendxp)[aeliot/todo-registrar

Register TODOs from source code in issue tracker

153.0k](/packages/aeliot-todo-registrar)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

252.5k](/packages/eslazarev-wildberries-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
