We are currently working on optimizing our product images for SEO and improving accessibility through better alt text implementation. Ideally, we would like to use the product title as the image name, but unfortunately, the product titles are too long for this to be practical.
Is there a way to use a metafield value to rename images, or to create an optimized image naming convention based on other product data (like a custom metafield)?
We want to keep the image names concise and relevant for SEO purposes.
Any advice or solutions you can offer would be greatly appreciated!
As images saved server side, is it possible to rename using shopify liquid with metafield value?
Because Liquid is a templating language designed to render dynamic content in the storefront, but it does not have direct access to the server-side file system or the ability to modify files like images on the server.
Why create a completely separate value? Unless there’s an existing metafield or you’re wanting a value that can be used in other places across the shop.
You can definitely do this on Shopify. If you leave it blank on product pages Shopify will automatically add the product title as image alt, which is sort of frustrating.
Is it just because it’s easier to mass update the metafield values rather than the image alt text values?
Hi Taylor,
I appreciate your suggestion for alt text.
Actually, I want to update product image name(including variant images), I have been using third party app to bulk edit the images, unfortunately in this case the product title is too long. Some of the product title also contains special characters and the App does not support or handle this.
So I wanted to use metafield values to update image name(using product title).