Man pondering what image to use for a blog

Having been writing blogs for several years, one of the things that I have struggled with is choosing a featured image. Sometimes an appropriate image readily springs to mind, but more often than not I can’t think of anything and leave it blank. Having some blogs with images, and others without offends my sense of order, so I decided this had to be fixed!

I tried to use AI to generate my images, but my early attempts were somewhat frustrating. My method was very basic – write the blog, decide what kind of image I wanted, and then ask DALL-E to generate it. The problem with this is that my limited creativity struggled with the second step – “decide what kind of image I wanted”. My image prompts relied on me describing the image – they were very short, and gave very little direction in terms of the content. The “breakthrough” came when I realised that instead of me writing the image prompt, I could get AI to read the finished blog and let it write the image prompt based on the content.

This leads to a 3 step process:

1) Write the blog
2) Ask AI to build an image prompt that captures the essence of the blog
3) Use the output of #2 to generate the image

The process is very simple and very quick. Indeed, I have no doubt that steps 2 and 3 could be automated and built into a general purpose tool (perhaps such tools already exist).

The remainder of this blog illustrates the process using my blog “Tears of Joy: Why Beauty and Effort Make Us Cry” as an example.

Step 1 – write your blog

Write the blog and copy the text to the clipboard

Step 2 – use the blog text to generate an image prompt

Ask ChatGpt (or your favourite AI tool) the following question.

Generate an image prompt that captures the essence of the following blog: <<YOUR BLOG TEXT>>

For the “Tears of Joy” blog, this gave me the following image prompt:

“A breathtaking landscape unfolds—a lone runner or hiker stands atop a misty hill, gazing out over an expansive valley bathed in golden sunrise light. Their face, flushed from exertion, glistens with tears of awe and release. The wind stirs their hair as they take in the vast beauty before them—a shimmering lake below, rolling green hills stretching into the horizon. A sense of quiet solitude and deep emotional connection permeates the scene, capturing the raw, unexpected power of nature and movement to evoke profound feelings.”

Step 3 – generate the image

Check the prompt generated in step 2, changing it as necessary. Next, go to your favourite AI image generator (I used DALL-E) and use the following prompt:

Generate a wide image of <<the image prompt above>>

The above prompt resulted in this image:

Man at the top of a hill in awe at the scene ahead of him

I used the above instructions using the text of this blog to generate the featured image of this blog!

Out of interest, I also applied this technique to one of my old Oracle blogs:

Recursive Groovy Closures

The resulting image was:

Tree showing organisation hierarchy

I have no doubt that this process could be further refined, for example specifying a style of image, the use of a pre-determined colour pallet etc. Have fun!

Categories:

Tags:

No responses yet

Leave a Reply

Your email address will not be published. Required fields are marked *