---
url: 'http://workflows-of-ai.com/blog/article-text-image'
title: 'Article text from Image'
author:
  name: 'Marcus Johansson'
  url: 'http://workflows-of-ai.com/about/marcus-johansson'
date: '2023-10-15T16:52:19+02:00'
updated: '2026-10-10T12:14:04+02:00'
type: article
summary: 'Generate article text from an image in Drupal: SceneX describes the header image and AI Interpolator OpenAI expands it into an article.'
tags:
  - 'Marcus Johansson'
  - Workflows
  - 'Drupal AI'
image: 'http://workflows-of-ai.com/sites/default/files/previews/9fe2928c4c0dd672.jpg'
published: true
og:
  site_name: 'Workflows of AI'
  'image:width': '1280'
  'image:height': '720'
  'image:alt': 'Article text from Image'
---
Drupal AI

# Article text from Image

Generate an article from nothing but a header image, with SceneX describing the picture and OpenAI writing the text.

  Marcus Johansson

October 15, 2023 · 2 min read

 ## About this video

The process starts with an image uploaded into the system. The AI Interpolator SceneX module is then employed to analyze the image. It scrutinizes the visual elements, details, and themes encapsulated in the image and converts these visual cues into a descriptive text. The text offers a comprehensive portrayal of the image, translating visual data into written words that are deposited into a text field.

With a descriptive text in hand, the AI Interpolator OpenAI module is activated. The OpenAI algorithms use the provided text as a base, expanding and elaborating upon it to generate a full-length article. The descriptive text serves as a prompt, guiding the generation of content that is not only expansive but also deeply aligned with the themes and elements initially captured in the image.

*This video is from before the AI Interpolator module became AI Automators, part of the [AI module](https://www.drupal.org/project/ai). Module and menu names have changed since, and some steps look different today.*

## Watch the video

[Watch on YouTube: Article text from Image](https://www.youtube.com/watch?v=HuSXYnPZhb0)

### Video chapters

- 0:00 An article from an image
- 1:13 The SceneX image description field
- 2:00 Article text with OpenAI
- 4:05 Why it will make things up
- 4:52 The MacBook article result

## Transcript

YouTube's automatic captions, lightly corrected. Click a line to jump to that moment in the video.

### Transcript

- 0:01 hey there Marcus here next workflow is the opposite of the last one um this is not the workflow that makes sense but it's um still one to show uh what you can do in terms of image descriptions so
- 0:19 what we're going to do is we have a header image but we don't actually have an article so we're going to generate an article from a header image um and this is going to I use
- 0:30 something called SceneX that can basically explain images as always this is Drupal um this is the OpenAI interpolator module if you want to know more about them uh there's soon going to
- 0:45 be links in the description where you can see how you install it uh set it up um and the idea behind the interpolator module um Dro and the Interpolator module is open source everything
- 1:01 is free everything you see here uh you can just set up yourself after uh you finished watching this video so I'm just going to start by logging in here so we have a content type in this
- 1:17 case there is an article but yeah we only have a header image so we need to create well first of all we need to have a field in between that's basically the image description
- 1:30 so this is where CX is going to take its image description and put it in here basically so we just need one field not the multi field full HTML they don't write HTML out so we
- 1:43 could have used uh plain text as well but anyway we're we're going to use that full HTML here CeX image description is the rule we want base mode and we take it from header image uh and put batch
- 1:57 mode on so we can see progress and then we basically need to add the article text and this should be formatted long because we actually want to create uh HTML in this case so we're going to
- 2:14 enable AI Interpolator here as well we're going to use OpenAI text log so that's taking text and generating text right we're going to use the image description as the uh context and then
- 2:27 we just write our prompt So based on on the context write a 10 paragraph article about the uh subject you may use HTML tags like headers um strong and M please set
- 2:53 up headers uh to have some structure in the article context is then we copy from here and of course um wait first before I start talking about that we're going to use
- 3:12 batch mode GPT-4 creates better uh or no actually we don't care so much about quality now so if you want better quality use gp4 but I want a a quick result now you are an uh uh left
- 3:30 top journalist no what do you call it a journalist that writes about tech so that's the role we want we have to set the interpolator weight higher than the last interpolator weight because we have
- 3:44 to take the image to image description before we can write the article because otherwise there's no text to base the article on right um then we just save this and go
- 3:53 to our content and resave it so we see now we have a image description and an article but they're empty um right so what I was going to say of course this this is not a a a good
- 4:11 um example of an actual workflow because what's going to happen now is that the CX will not produce that much text and of course uh um of course OpenAI can you know make this text more expressive
- 4:28 but unless you tell it to keep to a specific context and stay within the facts of that context it will make up text because I wrote that I wanted 10 paragraphs right uh and because of this
- 4:43 uh it might hallucinate so you should never do this unless you wanted to make up stuff of course so here you can see um yeah so this was not super good actually SceneX is not always great so
- 4:58 it thinks it's actually actually MacBook Pro and as far as I can see this should be the MacBook Air I don't know Apple products that well to be honest no maybe that is the
- 5:13 MacBook Pro I'm actually not sure anyway so this is the description that I created and this is the article maybe we can look at it like this instead so here's the article right with
- 5:30 headers as we asked for the quality is not great because I used 3.5 in this case but you see it can create an article from uh the image basically um but yeah it's a lot of
- 5:44 hallucination and so on but there is of course a use a much clearer use case and that's of course using this to uh create all tags and so on um but I wanted to show sh basically so that's why I I took
- 6:01 this workflow um yeah that's it thank you for watching

  Filed under [Workflows](/blog?category=6) [Drupal AI](/blog?category=2)

Parts of this content were produced by AI.

This site has not assessed whether a label is required for this content.

  How was AI used?The video and the introduction are Marcus's own, first published on workflows-of-ai.com. AI wrote the subtitle, the summary and the video chapters from the transcript, and corrected misheard names in YouTube's automatic captions.

   Marcus Johansson

Tinkers with AI and Drupal

 [About Marcus](/about/marcus-johansson)[Drupal.org profile](https://www.drupal.org/u/marcus_johansson)[Drupal AI](https://www.drupal.org/project/ai)

## The post in three sentences

SceneX writes a description of the header image into a text field, and an OpenAI rule with a higher weight turns it into a 10 paragraph article with headers. The result shows the limits: SceneX gives little text, it is unsure whether the laptop is a MacBook Air or Pro, and asking for 10 paragraphs from a short description makes the model invent things. Image descriptions fit better for alt tags.