Sets missing alt text on active products' images to the product title (optionally with a position suffix) for accessibility and image SEO.
async def run(ctx): for product in await ctx.shopify.query(ACTIVE_PRODUCTS): for index, image in enumerate(product.images, start=1):
How do you bulk-add image alt text on Shopify?
To bulk-add image alt text on Shopify, this template finds product images with empty alt attributes and fills them from the product title, optionally suffixed with the image position so a five-image gallery gets five distinct values. Hand-written alt text is never overwritten: the photographer's careful description stays, and only the blanks get filled. That makes the template safe to run on a mixed catalog where some products were done properly and most were not.
Alt text is an accessibility requirement, an image SEO signal, and the field most consistently skipped during uploads, and editing it image by image through the admin does not scale past a few dozen products. One run covers the whole catalog; the report lists every image with the alt text it would receive. Screen readers, Google Images and Merchant Center all read the same field, so one approval fixes three problems.
Last updated August 24, 2026
If you run a sharper version of this template, or something it inspired, send it in. We review every application and publish the good ones, credited to you or your agency.
AI writes real Python or TypeScript, a dry run rehearses it, you approve, it deploys.
Free plan · no card · 🇪🇺 EU data residency