Update Shopify Image Alt Text Attributes (tags) In Bulk With OpizenAI

5 min read
By Jono Farrington
image optimization in Shopify

The following is the process to use the image alt attribute update function for Shopify product images with OptizenAI.

The Tech

To update image alt attributes on Shopify products, we use Openai Vision.

As per their website:

GPT-4 with Vision, sometimes referred to as GPT-4V or gpt-4-vision-preview in the API, allows the model to take in images and answer questions about them. Historically, language model systems have been limited by taking in a single input modality, text. For many use cases, this constrained the areas where models like GPT-4 could be used.

https://platform.openai.com/docs/guides/vision

Essentially, we ask Vision to scan product images within our Shopify stores, and describe them in the form of alt text attributes. For more information on why image alt text is important, read our image alt article here.

TL:DR Version

The Flow

To update product images alt text with OptizenAI, we first need to select the products we wish to update. During the work flow, the app will then update “all” images associated with that product, depending on what prompt you provide the app. You can update single products or in bulk.

Note: Updating images does take longer than product updates. This is due to the extra time it takes to read the images, and also the multiple images each product may have.

The Prompt(s)

The prompts for image alt tag updates are simpler than product updates, however you still have the flexibility to get as granular as you like.

Below are examples of prompts we currently have in the public prompt repository:

Where To Use These AI Prompts

These prompts are specific to the Image ALT attributes for Shopify products. You can can use the prompts in their raw form from the repository, and then replace the sections in [square brackets].

You can also edit and or add to them for your specific use case.

When To Use This Prompt

This prompt can be used for product images in your Shopify store using the Optizen AI app. Updating alt attributes in bulk is time consuming and messy. It you use other apps, they generally use rules associated with the product title, which technically is not the correct way to create image alt tags.

If have a large store and you import images from catalogs, your images may either not have an alt attribute at all, or will be a string or numbers or incoherent text.

Example

Below you can see an example of an updated image alt text using OptizenAI.

Steps For Using This Prompt

Step 1: Navigate to the “Image” tab in Optizen AI. Search via name or using tags for the product or products you wish to update images. Use the check boxes to select the products. Click “Next”.

Step 2: Give the schedule a name. This is for your reference only. Then select from the dropdown, auto, low or high.

Here is the description from OpenAI what this means:

By controlling the detail parameter, which has three options, lowhigh, or auto, you have control over how the model processes the image and generates its textual understanding. By default, the model will use the auto setting which will look at the image input size and decide if it should use the low or high setting.

  • low will disable the “high res” model. The model will receive a low-res 512px x 512px version of the image, and represent the image with a budget of 65 tokens. This allows the API to return faster responses and consume fewer input tokens for use cases that do not require high detail.
  • high will enable “high res” mode, which first allows the model to see the low res image and then creates detailed crops of input images as 512px squares based on the input image size. Each of the detailed crops uses twice the token budget (65 tokens) for a total of 129 tokens.
https://platform.openai.com/docs/guides/vision

So be aware if you choose high, it will be slightly more expensive. We find that in most cases, “low” works fine. However the “high” setting can provide a more accurate output if your images have text, for example on a product label, or text on a t-shirt.

Step 3: Select the prompt you want to use from drop down under the Image ALT prompt field. You can choose any of the provided prompts, edit the provided prompts, or write your own. Be sure to check the box for “Update this section”. Then click Proceed.

Step 3: Click Proceed to run the prompt. On completion, check the output using the Log section of the app. You can then choose to keep or restore the update.

The next step is to test this prompt out for yourself in your Shopify store using Optizen AI.

Ready to Boost Your Shopify Store?

Increase revenue with video upsells and dominate search rankings with AI-powered SEO.

Related Articles