DP AI Featured Image: Create WordPress images with AI

DP AI Featured Image: Create WordPress images with AI

Writing a blog article is only part of the publishing process. Once the content is ready, there is usually another task waiting: finding or creating a suitable featured image.

Bright home office with WordPress editor displaying AI-generated blog featured image preview

For years, I have been using WordPress to create websites, publish articles, and manage content for different projects. And although the platform makes publishing relatively straightforward, preparing featured images has always involved a few extra steps.

You need to find an appropriate image, make sure it represents the subject, adjust its dimensions, optimize the file size, upload it to the Media Library, and assign it to the article.

With AI image generation becoming increasingly capable, I started wondering: why not bring the entire process directly into the WordPress editor?

That simple question led to the development of DP AI Featured Image, a lightweight WordPress plugin that uses the OpenAI API to generate featured images directly from article content.

The result is a practical tool that combines AI image generation, automatic ALT text creation, WebP optimization, and WordPress integration in one straightforward workflow.

In this article, I’ll explain why I built it, how it works, and how you can use it to simplify your own publishing process.

The problem with creating featured images for WordPress

A featured image is often the first visual element visitors encounter when discovering a blog article.

Depending on your WordPress theme, it might appear at the top of the article, in your blog archive, alongside related posts, or in previews shared on social media.

A good featured image should communicate the article’s subject, complement the website’s visual identity, and encourage visitors to explore the content.

Unfortunately, finding the right image isn’t always easy.

Stock photography can look repetitive, particularly when you’re writing about technical subjects, web development, business processes, or emerging technologies.

AI image generators provide an interesting alternative, but they usually introduce another workflow.

You open an image-generation platform, describe the image, wait for the result, download it, optimize it, return to WordPress, upload the file, and finally assign it to your article.

None of these steps is particularly difficult. However, when you regularly publish content, the process becomes repetitive.

I wanted something simpler: a way to generate the image without leaving WordPress.

Introducing DP AI Featured Image

DP AI Featured Image is a WordPress plugin that connects to OpenAI’s API and lets you generate featured images directly from the post editor.

It works with both the Gutenberg block editor and the traditional WordPress Classic Editor.

Unlike a general-purpose image-generation interface, the plugin focuses on one specific task: creating a suitable featured image for the article you’re working on.

The initial version, 1.0, allowed users to enter an image prompt, choose a visual style and composition, and generate an image that would automatically become the post’s featured image.

That was already useful, but after testing the workflow, I realized something was missing.

Why should the user have to describe an image when the article already contains the information needed to create one?

This led to version 1.1, which introduced article-content analysis and automatic ALT text generation.

Now, instead of writing a detailed image prompt, you can ask the plugin to analyze your article and propose an appropriate visual concept.

Generate featured images directly from article content

This is probably my favorite feature.

When you open the AI Featured Image panel, you’ll find two generation options: Article content (AI) and Custom prompt / post title.

The first option allows the plugin to use your article as the starting point.

Imagine you’ve just finished writing an article about the benefits of installing solar panels on commercial buildings.

Instead of preparing a lengthy description for an image generator, you select Article content and click Generate & Set Featured Image.

The plugin sends a representative portion of the article to an OpenAI text model, which identifies its main subject and prepares a visual brief.

That brief is then passed to the selected image-generation model.

In our example, the generated image might feature a realistic commercial building with solar panels installed across its roof, photographed in natural daylight.

The image is based on the article’s context rather than a generic interpretation of a few keywords.

This approach is particularly useful for longer articles covering technical subjects where the title alone may not provide enough visual information.

The plugin can also read the content currently in the WordPress editor, including unsaved changes, so you don’t necessarily have to publish your article before creating its featured image.

Prefer writing your own prompts?

The original manual generation option is still available.

You can describe exactly what you want to see, including the subject, environment, lighting, atmosphere, and composition.

If you leave the prompt empty, the plugin can use the post title as its starting point.

This provides a useful balance between automation and creative control.

Sometimes you want AI to interpret the article. Other times, you already have a specific visual concept in mind.

Both workflows are supported.

Automatic ALT text generation for better accessibility

One of the improvements introduced in version 1.1 is the automatic creation of descriptive ALT text.

ALT text, short for alternative text, provides a textual description of an image.

It helps people using screen readers understand visual content and provides useful context when an image cannot be displayed.

Descriptive alternative text can also help search engines understand an image’s subject, although it should never be treated as an opportunity to stuff additional keywords into a page.

For example, imagine the plugin generates a featured image showing a technician inspecting solar panels on an industrial rooftop.

An appropriate ALT text could be:

Technician inspecting photovoltaic panels installed on the roof of a commercial building.

This is much more useful than simply repeating the article title or entering something generic such as “solar panels image.”

DP AI Featured Image generates a relevant ALT text alongside the image concept and saves it directly to WordPress’s Alternative Text field.

When possible, it also follows the language of the article, which makes it useful for multilingual publishing.

The plugin deliberately leaves the image caption empty.

This is an important distinction: ALT text and image captions serve different purposes.

ALT text describes an image for accessibility, while a caption is visible text associated with an image.

For ordinary featured images, I generally prefer having a descriptive ALT attribute without adding an unnecessary caption below the photograph.

Because the automatic ALT text is prepared from the intended visual concept, it’s still worth checking that the description accurately matches the finished image.

You can also enter your own ALT text before generating if you want complete control.

WebP optimization and image dimensions

Generating an attractive image is only part of the process. The file also needs to be suitable for a website.

Oversized images can increase page weight and contribute to slower loading times, especially on mobile devices.

For that reason, DP AI Featured Image saves its generated images in WebP format.

WebP offers efficient compression and is supported by modern browsers, making it a practical choice for many WordPress websites.

The plugin also provides several image dimensions and aspect ratios, including:

  • 16:9 landscape — 1536 × 864 pixels

  • 3:2 landscape — 1536 × 1024 pixels

  • 4:3 landscape — 1024 × 768 pixels

  • 1:1 square — 1024 × 1024 pixels

Personally, I tend to prefer landscape images for blog articles because they work well in many featured-image layouts.

However, the best aspect ratio depends on the design of your website and the way your theme displays thumbnails.

You can also choose the generation quality and visual composition, including whether the main subject should appear toward the center, left, or right of the frame.

The plugin requests images without embedded typography, captions, or watermarks, helping produce cleaner visuals for editorial use.

These instructions guide the AI model, although the final result should always be reviewed.

Everything happens inside WordPress

One of the main objectives behind this project was to avoid introducing another complicated publishing tool.

After generating an image, I didn’t want to download files manually or open the Media Library to assign the featured image.

DP AI Featured Image takes care of those steps.

Once generation is successful, the plugin saves the image to your WordPress Media Library, assigns the generated ALT text, and sets the new attachment as the featured image of the current post.

The image remains a standard WordPress media attachment.

You can find it in the Media Library, edit its metadata, reuse it, or replace it later.

There is no special image-hosting service to manage and no external image URL that your website must depend on when displaying the featured image.

The generated file belongs to your normal WordPress media workflow.

DP AI Featured Image

How to install DP AI Featured Image

Installation follows the same process as a conventional WordPress plugin.

The current version is 1.1.0 and requires WordPress 6.2 or later and PHP 7.4 or later.

You will also need an OpenAI API key with API billing enabled.

Step 1: Install the plugin

Open your WordPress dashboard and navigate to Plugins → Add New → Upload Plugin.

Select the DP AI Featured Image ZIP file, install it, and activate the plugin.

There’s no need to extract the ZIP before uploading it.

Step 2: Configure your OpenAI API keysettings for DP AI Featured Image

Once activated, navigate to Settings → DP AI Featured Image.

Enter your API key and choose the image-generation model you want to use.

If you don’t already have an API key, you can create one through the OpenAI Platform.

Keep your API key private and never publish it in an article or client-side script.

For developers who prefer to manage credentials outside the WordPress database, the plugin also supports defining the key through a constant in wp-config.php.

Step 3: Open an article

Create a new post or edit an existing one.

In Gutenberg, locate the AI Featured Image panel in the post settings sidebar.

If you’re using the Classic Editor, you’ll find the equivalent plugin meta box.

Step 4: Choose your generation method

Select Article content if you want the AI to interpret your post, or Custom prompt / post title if you prefer to describe the image yourself.

You can then choose the image style, composition, dimensions, and quality.

If you want to provide your own ALT text, enter it in the optional override field.

Step 5: Generate your featured image

Click Generate & Set Featured Image.

The plugin prepares the image description, requests the image through OpenAI, and processes the result.

When generation completes successfully, the image is added to the Media Library and assigned to the post.

Review the result, verify the ALT text, and save or update your article normally.

That’s the entire workflow.

wordpress editor featured image ai generated

What happens behind the scenes?

Although DP AI Featured Image has a relatively simple interface, there are several operations involved in generating each image.

In article mode, the process begins with an analysis of the article’s content.

The plugin extracts the written text, removes unnecessary formatting, and sends a representative excerpt to OpenAI’s gpt-4.1-mini text model.

The model prepares two things: an image-generation brief and a suggested ALT text.

The brief is then combined with the visual settings selected in WordPress and passed to the configured GPT Image model.

Once the generated image is returned, WordPress receives the resulting WebP file and stores it as a media attachment.

The plugin writes the ALT text into the attachment’s metadata, leaves the caption empty, and associates the image with the current article.

This two-stage approach separates the task of understanding the content from the task of generating the image.

It also makes the plugin more useful for SEO content workflows because the visual concept starts with the subject of the article.

Does it cost anything to generate images?

The plugin itself doesn’t require a separate image-generation subscription, but OpenAI API usage is billed independently.

An important detail: a ChatGPT subscription does not automatically include OpenAI API credits.

For each image generated, DP AI Featured Image makes a text-model request to prepare the visual concept and ALT text, followed by an image-generation request.

The cost depends on the selected model, image dimensions, quality, and current API pricing.

You can review the latest charges on the official OpenAI API pricing page.

I deliberately kept image generation as a manual action.

The plugin doesn’t automatically generate a new image every time an article is edited or saved, which would create unnecessary requests and additional costs.

Another consideration is privacy. In article mode, selected article content is sent to OpenAI for analysis, including unpublished draft text when you choose to generate from it.

For that reason, I recommend avoiding confidential or sensitive material unless you’re authorized to process it through the API.

Why I prefer a lightweight, dedicated plugin

WordPress offers an enormous ecosystem of plugins, including sophisticated AI writing platforms and image-generation services.

Some provide extensive collections of features covering everything from article creation to content scheduling and marketing automation.

Those solutions can be useful, but they aren’t always necessary.

For this project, I wanted something focused.

I didn’t need another writing assistant, SEO dashboard, or content-management system.

I needed a tool that would generate an appropriate featured image and put it in the correct place.

By limiting the plugin to a specific task, the interface stays manageable and the feature can fit naturally into an existing publishing routine.

There’s also the benefit of retaining control over the generated files.

Images are stored locally in the WordPress Media Library, where they can be managed just like any other uploaded photograph.

And if you stop using the plugin, your previously generated images remain available.

Can AI-generated images improve SEO?

AI-generated images are not an automatic shortcut to better search rankings.

Search engines don’t reward an article simply because its featured image was created using artificial intelligence.

What matters is whether the image supports the content and provides a useful experience for visitors.

A relevant featured image can make an article more visually appealing, reinforce its subject, and help readers understand the topic.

Proper image dimensions, efficient compression, and accurate ALT text also contribute to good publishing practices.

DP AI Featured Image brings several of these tasks into a single workflow, but it doesn’t replace editorial judgment.

In some situations, original photography, product images, diagrams, or screenshots will be more appropriate than an AI-generated illustration.

For example, a tutorial explaining a specific WordPress interface should ideally include genuine screenshots rather than generated approximations.

I see AI image generation as another useful tool for content creators, not as a replacement for every type of visual content.

Who could benefit from this plugin?

DP AI Featured Image was built around my own publishing requirements, but the same workflow can be useful for other WordPress users.

Independent bloggers can generate consistent images without relying on repetitive stock photography.

Small businesses publishing educational articles can create visuals suited to their services or industry.

Content writers and SEO professionals can reduce the time spent preparing images for informational articles.

Web designers and developers can also integrate AI-assisted image creation into websites they maintain, without introducing an entirely separate publishing platform.

The common advantage is convenience: generating the image from the same interface used to write and publish the article.

Download DP AI Featured Image v1.1.0

If you’d like to try the plugin on your own WordPress website, you can download the ZIP package and install it directly from the WordPress dashboard.

DP AI Featured Image v1.1.0 includes article-content analysis, manual prompt generation, automatic ALT text, selectable image settings, WebP output, and automatic featured-image assignment.

Download DP AI Featured Image v1.1.0

The plugin is distributed under the GPLv2-or-later license.

Remember that you’ll need your own OpenAI API key and an account with API billing enabled.

I recommend testing the plugin on a staging website before installing it on an important production site, particularly if your WordPress installation uses heavily customized post editors or media-management plugins.

Frequently asked questions

Can I generate featured images without writing a prompt?

Yes. Select Article content (AI), and the plugin will analyze your article to prepare an image-generation brief automatically. You can also use the post title in manual mode.

Does the plugin support Gutenberg and the Classic Editor?

Yes. DP AI Featured Image includes an interface for both WordPress editors.

Can I choose the image dimensions?

Yes. The plugin supports landscape and square formats, including 16:9, 3:2, 4:3, and 1:1 aspect ratios.

Does the plugin automatically generate ALT text?

Yes. The plugin prepares a descriptive ALT text based on the intended image concept and saves it to WordPress’s Alternative Text field. You can also provide your own description.

Does the plugin add an image caption?

No. Images generated with version 1.1.0 have an empty WordPress caption field. The descriptive text is stored as ALT text instead.

Are generated images stored on my website?

Yes. The resulting WebP images are saved in your WordPress Media Library and assigned to the relevant posts.

Is the OpenAI API free?

API image generation is billed according to OpenAI’s current pricing. A paid ChatGPT subscription is separate from API billing.

Does the plugin support articles written in other languages?

Yes. The content-analysis process can work with articles written in different languages, and the generated ALT text is instructed to follow the article’s language when possible.

Can I continue using an image after removing the plugin?

Yes. Previously generated images remain in the WordPress Media Library even if you deactivate or uninstall DP AI Featured Image.

Final thoughts

DP AI Featured Image started as a small experiment to solve a repetitive problem in my own WordPress publishing workflow.

What began as a simple prompt-based image generator quickly developed into a more useful tool capable of understanding article content, preparing suitable visuals, creating descriptive ALT text, and handling image optimization and assignment automatically.

I particularly like the fact that it doesn’t attempt to reinvent the WordPress publishing experience.

It simply improves one part of it.

For anyone regularly publishing articles, removing a few repetitive steps can make a noticeable difference over time.

And with AI image generation continuing to evolve, there’s plenty of room to explore additional features in future versions.

For now, version 1.1.0 does exactly what I originally wanted: it lets me finish writing an article, generate a relevant featured image, and publish without leaving WordPress.

Sometimes the most useful tools are the ones that solve a relatively small problem particularly well.

Share
Share
Website maintenance by: dp