Shopify Image SEO: Compression, Alt Text, and Schema
Master Shopify image SEO in 3 steps: compression, alt text, and schema markup. Rank faster, load quicker, show up in AI search.
The Problem With Most Shopify Stores
Your product images are invisible to search engines. They're also slow. And they're definitely not showing up when ChatGPT or Perplexity recommends products in their AI search results.
Most Shopify founders skip image SEO entirely. They upload a 5MB photo, write "product photo" as the alt text (or skip alt text altogether), and wonder why Google Images traffic never materializes. Meanwhile, their page speed tanks, their Core Web Vitals fail, and AI engines have no structured data to understand what's actually in the image.
The brutal truth: image SEO is low-hanging fruit. Three things matter. Compression. Alt text. Schema markup. You can nail all three in under an hour, and the payoff is immediate—faster load times, better rankings, and visibility in AI-powered product discovery.
This guide walks you through each one, step by step, with the exact settings and code you need for Shopify.
Prerequisites
Before you start, you'll need:
- A Shopify store with at least one product (obviously)
- Access to your Shopify admin dashboard with permission to edit products and theme settings
- Google PageSpeed Insights open in a browser (free, no signup required)
- A basic text editor or willingness to paste code into Shopify's theme editor
- 5-10 product images ready to optimize (you can batch-process these)
- Understanding that alt text is not optional—it's a legal accessibility requirement and an SEO signal
If you've never touched your Shopify theme code before, don't panic. We'll walk through the no-code path first, then the code path. Pick whichever fits your comfort level.
Step 1: Compress Your Images Without Losing Quality
Image compression is the fastest win. A single unoptimized product photo can be 3–5MB. Compressed properly, it's 150–300KB. That's a 10–20x reduction in file size with zero visible quality loss.
Google's Core Web Vitals now directly impact rankings. Largest Contentful Paint (LCP) is the metric that kills you. Uncompressed images are the #1 culprit.
The Right Image Format
Shopify accepts JPG, PNG, WebP, and GIF. Here's what to use:
- JPG: Product photos, lifestyle shots, anything with gradients or many colors. Compress to 70–80% quality.
- PNG: Product images with transparency (logos, icons on white backgrounds). Larger file size, but necessary for transparency.
- WebP: Next-gen format. Smaller than JPG and PNG. Not all browsers support it, but Shopify handles the fallback automatically.
- GIF: Avoid unless you need animation. WebP is better for animated images.
For 95% of product images, use JPG compressed to 75% quality. That's the sweet spot between file size and visual fidelity.
Compress Locally Before Uploading
Shopify does some automatic optimization, but it's not aggressive enough. Compress locally first.
Option 1: No-Code (Recommended for Most Founders)
- Go to TinyPNG or ImageOptim (Mac) or FileOptimizer (Windows).
- Upload your product image.
- Download the compressed version.
- Check the file size. It should be under 300KB for a standard product photo.
- Open the original and compressed side-by-side. If they look identical, you're done. If the compressed version looks noticeably worse, re-upload and set quality to 80% instead of 75%.
Option 2: Command Line (For Batch Processing)
If you have 50+ images, use ImageMagick or FFmpeg:
convert product.jpg -quality 75 -strip product-compressed.jpg
This strips metadata (which you don't need) and compresses to 75% quality. Run it on a folder of images:
for file in *.jpg; do convert "$file" -quality 75 -strip "${file%.jpg}-compressed.jpg"; done
Upload to Shopify
- Log into your Shopify admin.
- Go to Products > select a product.
- Scroll to Media section.
- Click Add media and upload your compressed image.
- Shopify will process it and serve optimized versions automatically.
Done. Shopify's CDN will serve the right size to the right device. You've just cut your LCP metric in half.
Validate Your Compression
- Go to Google PageSpeed Insights.
- Enter your product page URL.
- Run the audit.
- Look for "Properly size images" and "Serve images in next-gen formats" in the Opportunities section.
- If both are gone or marked as "passed," you're done with compression.
If PageSpeed still flags images, your compression wasn't aggressive enough. Go back to step 1 and compress to 70% quality instead.
Step 2: Write Alt Text That Ranks
Alt text serves two purposes: accessibility (screen readers, when images fail to load) and SEO (Google Images, AI search engines, and text-based search).
Most Shopify stores write garbage alt text: "blue shirt," "product photo," or nothing at all. That's a missed ranking opportunity and an accessibility violation.
Good alt text is:
- Descriptive: Describe what's actually in the image, not what you want to rank for.
- Concise: 8–12 words. Not a sentence. Not a paragraph.
- Keyword-aware: If the keyword fits naturally, include it. Don't force it.
- Specific to the product: "Women's merino wool hiking boot, brown leather, side view" beats "hiking boot."
How to Write Alt Text for Different Image Types
Product Photo (Front View)
Bad: "shoe" Good: "Women's brown leather hiking boot, side view, merino wool lining"
Why? The good version tells Google exactly what's in the image. A searcher looking for "women's brown hiking boots" might see this in Google Images. The bad version is useless.
Lifestyle Photo (Product in Use)
Bad: "woman hiking" Good: "Woman hiking on mountain trail wearing brown merino wool boots, autumn forest"
Why? You're showing context. Alt text should reflect that. Google and AI search engines use this to understand not just the product, but the use case.
Detail Shot (Sole, Stitching, Material)
Bad: "boot detail" Good: "Merino wool hiking boot sole, Vibram traction pattern, close-up"
Why? Detail shots are where durability and quality signals live. Alt text should highlight what makes the product special.
Size/Scale Reference (Product Next to Coin, Hand, etc.)
Bad: "size reference" Good: "Women's hiking boot next to US quarter for size reference"
Why? You're showing scale. Say it explicitly.
Add Alt Text in Shopify (No Code)
- Go to Products > select a product.
- Scroll to Media.
- Click the image thumbnail.
- A modal will open. Look for the Alt text field.
- Write your alt text (8–12 words, descriptive, keyword-aware).
- Click Done.
- Repeat for all images on the product.
Validate Alt Text
- Open your product page in a browser.
- Right-click on the product image.
- Click Inspect (or Inspect Element).
- Look for the
<img>tag. You should seealt="your alt text here". - If the
altattribute is missing or empty, alt text didn't save. Go back and re-enter it.
The Accessibility Bonus
Alt text isn't just for SEO. Screen reader users (blind and low-vision visitors) rely on it to understand your products. Writing good alt text is a legal requirement under WCAG 2.1 and the Americans with Disabilities Act. It's also the right thing to do. You can read more about how to write and add image alt text on Shopify's official guide.
Step 3: Add Schema Markup for AI Search Visibility
This is the step that separates founders who understand AI search from those who don't.
Google Images, ChatGPT, and Perplexity all use structured data (schema markup) to understand what's in an image. Without it, your product image is just a JPEG file. With it, it's a product that can be recommended, cited, and ranked.
Schema markup for images uses the ImageObject type. It tells search engines:
- What the image shows
- Who created it
- What product it's associated with
- Image dimensions and file size
- License information (optional)
For Shopify stores, you'll want to add schema markup at the product level, not the image level. Shopify's default product schema includes images, but it's often incomplete.
Check Your Current Schema
- Go to your product page in a browser.
- Right-click anywhere on the page.
- Click View Page Source (or Inspect).
- Press Ctrl+F (or Cmd+F) and search for
"@type": "Product". - If you find it, Shopify is already outputting product schema. Good.
- Look for
"image"within that schema block. If it's there, Shopify is including image URLs. - If you don't see product schema at all, your theme is missing it. We'll fix that below.
Option 1: Use Shopify's Built-In Schema (No Code)
Most modern Shopify themes output product schema automatically. If your theme was built in the last 2 years, it probably does.
To verify:
- Go to Google's Rich Results Test.
- Paste your product page URL.
- Click Test URL.
- Wait 30 seconds for Google to crawl it.
- If you see a green checkmark and a preview of your product, schema is working. Done.
- If you see "No rich results detected," your theme is missing schema. Go to Option 2.
Option 2: Add Schema Manually (Light Code)
If your theme doesn't output product schema, you'll add it manually. This takes 10 minutes.
- Go to Online Store > Themes.
- Click Edit code (top right).
- In the left sidebar, find product.liquid (or product.json if you're using Shopify 2.0 theme architecture).
- Open it.
- Find the closing
</head>tag or the end of the template (look for</product>or similar). - Paste this code just before the closing tag:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Product",
"name": "{{ product.title }}",
"description": "{{ product.description | strip_html | truncatewords: 30 }}",
"image": "{{ product.featured_image | img_url: '1024x1024' }}",
"brand": {
"@type": "Brand",
"name": "{{ shop.name }}"
},
"offers": {
"@type": "Offer",
"url": "{{ product.url }}",
"priceCurrency": "{{ shop.currency }}",
"price": "{{ product.price | divided_by: 100.0 }}",
"availability": "{{ product.available | default: false | capitalize }}"
}
}
</script>
- Click Save.
- Wait 10 seconds for the theme to update.
- Go back to Google's Rich Results Test.
- Paste your product URL again.
- You should now see product schema with a green checkmark.
Option 3: Use a Shopify App (Easiest)
If code makes you nervous, use an app. Schema Plus or SEO Manager can add schema without touching code.
- Go to Apps and sales channels > App and sales channel settings.
- Click Search the app store.
- Search for "schema" or "structured data."
- Pick one with good reviews (4.5+ stars, 100+ reviews).
- Install it and follow the setup wizard.
- Most will auto-detect your products and add schema automatically.
Validate Your Schema
After adding schema, validate it with Schema.org's Live Tester or Google's Rich Results Test.
- Paste your product URL.
- Wait for the test to complete.
- You should see:
- Product name
- Price
- Availability (in stock / out of stock)
- Image URL
- Brand name
- If anything is missing, go back to your schema code and check for typos.
- If the test still fails, read the error message. It will tell you exactly what's wrong.
Once validation passes, you're done. Google now understands your product and its image. AI search engines can cite it. You're showing up in product recommendations.
Bonus: Image Filenames and Metadata
Before you optimize, rename your image files. This is a micro-signal, but it matters.
Bad filenames:
- IMG_1234.jpg
- product (1).jpg
- photo.jpg
Good filenames:
- womens-brown-hiking-boot-side-view.jpg
- merino-wool-boot-vibram-sole-detail.jpg
- hiking-boot-size-reference-quarter.jpg
Why? Search engines parse filenames as text. A descriptive filename is a weak ranking signal. It also helps you organize images locally.
Rename before uploading to Shopify. Once uploaded, Shopify renames files anyway, but good local naming habits prevent mistakes.
Also strip metadata (EXIF data) from images before uploading. This includes camera model, GPS coordinates, and timestamps. It adds file size and exposes privacy info.
Most compression tools (TinyPNG, ImageOptim) strip metadata automatically. If you're using command-line tools:
convert image.jpg -strip image-cleaned.jpg
The -strip flag removes all metadata.
Connecting Image SEO to AI Engine Optimization
Image SEO isn't just about Google Images anymore. AI search engines like ChatGPT and Perplexity are becoming product discovery tools.
When someone asks ChatGPT "recommend a good hiking boot," the model cites sources and sometimes includes images. For your product to be cited and recommended, AI engines need:
- Structured data (schema markup) so they understand what you're selling
- Alt text so they know what the image shows
- Fast-loading images so your page loads quickly and ranks higher
You can learn more about AEO basics for e-commerce and how to show up when AI recommends products.
If you're serious about organic visibility in AI search, image SEO is non-negotiable. It's also the foundation for broader AEO strategy. Shopify stores that nail image SEO tend to rank better overall because they're faster, more accessible, and better structured.
Performance Benchmarks: What "Good" Looks Like
After you optimize, here's what to expect:
Page Speed
- Before optimization: LCP 4–6 seconds, CLS 0.2+, FID 200ms+
- After compression: LCP 1.5–2.5 seconds, CLS 0.05–0.1, FID 50–100ms
You won't get to "perfect" (LCP under 2.5s) with images alone, but compression is 60% of the battle.
SEO Impact
- Google Images traffic: Expect a 20–40% increase within 4 weeks if you also write good alt text.
- Core Web Vitals: If LCP was your bottleneck, you'll see it improve to "Good" (green) within 2 weeks.
- Ranking improvements: Not immediate, but pages with good Core Web Vitals tend to rank 5–15% higher over 2–3 months.
AI Search Visibility
- Schema validation: Should pass within 24 hours of adding markup.
- AI citations: Can take 2–4 weeks for ChatGPT and Perplexity to crawl and index your products.
- Product recommendations: Once indexed, you'll start appearing in AI product recommendations if your product is relevant and your schema is accurate.
Common Mistakes to Avoid
Mistake 1: Uploading Uncompressed Images
Don't upload images larger than 500KB. Shopify will serve them, but they'll tank your page speed. Compress first.
Mistake 2: Writing Keyword-Stuffed Alt Text
Alt text like "best hiking boots for women affordable price waterproof" is spam. Google penalizes it. Write naturally. Describe what you see.
Mistake 3: Forgetting Alt Text on Decorative Images
Decorative images (dividers, backgrounds, icons) should have empty alt text: alt="". This tells screen readers to skip them. Don't write "decorative image" or "spacer"—leave it blank.
Mistake 4: Not Validating Schema
You add schema, think you're done, and never check if it's actually working. Validate with Google's Rich Results Test. It takes 2 minutes and catches 90% of errors.
Mistake 5: Using Different Images for Different Variants
If your product comes in multiple colors, use separate images for each variant. But make sure your schema reflects the correct image for each variant. Shopify handles this automatically if you set it up right, but double-check.
The Audit Checklist
Use this to audit your Shopify store's image SEO:
- All product images are under 300KB
- All product images have descriptive alt text (8–12 words, no keyword stuffing)
- Product schema is added and validates in Google's Rich Results Test
- Image filenames are descriptive (not IMG_1234.jpg)
- Metadata is stripped from images (no EXIF data)
- Google PageSpeed Insights shows no "Properly size images" or "Serve images in next-gen formats" warnings
- Decorative images have empty alt text (
alt="") - All product images use JPG at 75% quality or PNG with transparency
- Schema includes product name, price, availability, brand, and image URL
- You've tested at least one product page with Google's Rich Results Test
Getting Started: The 60-Minute Plan
If you have a Shopify store with 5–10 products, here's your timeline:
Minutes 0–10: Compress your 5 product images using TinyPNG.
Minutes 10–30: Write alt text for each image. Spend 2–3 minutes per image. Describe what you see.
Minutes 30–40: Add alt text to Shopify. Go to each product, paste alt text, save.
Minutes 40–50: Check if your theme has product schema. Go to Google's Rich Results Test, paste a product URL, and see if it validates.
Minutes 50–60: If schema is missing, paste the code from Option 2 above into your theme. If schema is present, you're done.
If you have 50+ products, batch the compression step. Use the command-line tool and process all images at once. Alt text still needs to be written manually (you can't automate good alt text), but you can do 10 products per day.
For a deeper technical audit, you might also want to review your robots.txt, sitemaps, and canonicals to ensure images are being crawled properly.
Why This Matters for Founders
You shipped. You have a product. You have customers. But you're not getting organic visibility.
Image SEO is one of the highest-ROI fixes you can make. It's not sexy. It doesn't feel like "growth hacking." But it works.
Compression fixes your page speed. Alt text helps Google and AI engines understand your products. Schema markup makes you eligible for rich snippets and AI citations. Together, they're the difference between invisible and findable.
Most Shopify stores skip this because it feels tedious. That's exactly why it works. You do it, and you're ahead of 80% of your competitors.
You can also set up Open Graph tags for better click-through from AI search to maximize the traffic once you're ranking. And if you want a full technical audit of your Shopify store, tools like Seoable can give you a domain audit, brand positioning, and keyword roadmap in under 60 seconds for a one-time $99 fee—plus 100 AI-generated blog posts to drive organic traffic.
Final Checklist: Did You Actually Do This?
Before you move on, verify:
- Compression: Open Google PageSpeed Insights, paste a product URL, and confirm no image warnings appear.
- Alt text: Right-click a product image, inspect, and see
alt="descriptive text"in the HTML. - Schema: Go to Google's Rich Results Test, paste a product URL, and see a green checkmark with product details.
If all three pass, you're done. Your images are optimized, accessible, and ready for AI search.
Now ship. Rank. Get customers.
Get the next one on Sunday.
One short email a week. What is working in SEO right now. Unsubscribe in one click.
Subscribe on Substack →