Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hello
I’m currently facing an issue with the Alt text on my Shopify website. The text is not organized properly, and I’d like to structure it in the same format as another website, such as sniffies app. However, I haven’t optimized the Alt text for SEO yet. I’d like to check whether the Alt text is embedded in the code, and if it’s not, I’d appreciate guidance on how to incorporate it using JSON format. Any insights or recommendations would be greatly appreciated.
Thank you!
Hi @broderickson,
If your Shopify website’s Alt text is not properly structured, the first step is to check whether it is embedded in the code and how it's being displayed. You also mentioned that you want it to follow a specific format, like on Sniffies App, and you haven’t optimized it for SEO yet.
If you want to structure Alt text using JSON, you can modify your theme.liquid or product.liquid file. Here’s an example of how you can output product images with Alt text in JSON format:
{
"images": [
{
"src": "{{ product.featured_image | img_url: '600x600' }}",
"alt": "{{ product.featured_image.alt | default: 'Default Alt Text' }}"
},
{% for image in product.images %}
{
"src": "{{ image | img_url: '600x600' }}",
"alt": "{{ image.alt | default: 'Product Image' }}"
}
{% endfor %}
]
}
To improve SEO, ensure that your Alt text includes relevant keywords and describes the image accurately. Here are some best practices:
Use descriptive text (e.g., "Red Running Shoes for Men – Lightweight & Comfortable").
Avoid generic terms like "image" or "photo".
Include primary keywords naturally.
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025