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. travelopia/wordpress-ai

ActiveWordpress-plugin

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

0.1.0(1mo ago)30PHPPHP ^8.3CI passing

Since Mar 24Pushed 1mo 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 1mo ago

READMEChangelog (1)Dependencies (11)Versions (2)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
```

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

40

—

FairBetter than 87% of packages

Maintenance98

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

45d 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 (52 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)")[![jignesh-travelopia](https://avatars.githubusercontent.com/u/113992677?v=4)](https://github.com/jignesh-travelopia "jignesh-travelopia (15 commits)")[![rutviksavsani](https://avatars.githubusercontent.com/u/53530700?v=4)](https://github.com/rutviksavsani "rutviksavsani (15 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

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M647](/packages/sylius-sylius)[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k20](/packages/neuron-core-neuron-ai)[open-dxp/opendxp

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

7310.3k29](/packages/open-dxp-opendxp)[madewithlove/htaccess-cli

CLI interface for the best htaccess tester in the world.

4329.1k](/packages/madewithlove-htaccess-cli)[webgriffe/sylius-akeneo-plugin

Plugin allowing to import products data from Akeneo PIM to your Sylius store.

2477.8k](/packages/webgriffe-sylius-akeneo-plugin)[statamic-rad-pack/meilisearch

meilisearch search driver for Statamic

1661.7k](/packages/statamic-rad-pack-meilisearch)

PHPackages © 2026

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