All things Shopify and commerce
Hi everyone,
I'm doing some looking to see how I can stop Shopify from changing my file names when uploading them. I have renamed my image files offline for SEO purposes, but when uploaded, they appear with a long extension added. This can include things like '1024x1024' or a long code, e.g. '485a5yt4a' etc.
I cannot seem to see a way to stop Shopify from doing this, irrespective of the image I upload. Can someone please help me with this? Quite frustrating.
You can see exact examples if you visit my site (https://hausofleather.com) and view source on any page.
And just to clarify, I know how to add alt-text. This is a separate issue.
Thanks in advance!
Hello,
This happened to me recently and I couldn't understand why I had some image names with this nuisance extension getting added in. (see bold extension below)
ie. Logo_Clear_BG_360x100_530cfd6b-eacc-4f04-b2ac-1c3b6f0a5586.png
So I ran a quite few tests and surmised the following.
- appears to occur if filename contains an underscore AND if filename ends with a digit.
This filename remained unchanged after upload by adding h and the end of the basename: Logo_Clear_BG_360x100h.png
I've seen posts where shopify staff recommend purchasing a renaming app. So I hope this post helps others.
The image name I used does not have any digit or underscore to it. It's just plain alphabets. Would someone happen to know why Shopify would randomly add an extension to that file?
Often, it would not allow to extract the file to dedicated location despite the correct name being used, too.
Hi
The addition of '1024x1024' type characters to your filename, and possibly with things like ?v=1683719328 after the file extension (I've just worked out today when trying to fix something else!) is because Shopify adds these when you insert an uploaded image to your product page and use one of the preset sizes e.g. Product Thumbnail (which is 240x240), Wallpaper (which is 1024x1024).
A way to make sure that only your image names are used is to select 'Original size' when you insert the image, and then use height & width properties (perhaps via CSS for tidiness) on the image.
I've also discovered today that when you use the preset image sizes, Shopify actually *resizes the image* so that it's optimised (rather then just *displaying* it at a particular size) - hence the new filename.
That worked. Good solve! I was using underscores and ending in numbers. So not doing that anymore.
I've also just discovered that Shopify renames upload files when there is an existing image file with the same name. It's possible to edit the newly uploaded files to have your preferred (SEO friendly) filename by going into Files, selecting the duplicate file, and amending the 'URL Handle'.
You'll find that the new upload remains a duplicate file, but now has the exact same name and URL as the original. I have no idea how this is possible!?! Also - you can give the duplicate a different Alt Text, which may be handy, or just a pain to add to your new file(s).
I spent hours today and had two chat sessions with the same result. Here is what I found. The only way I could keep the file name consistent with what I’d named it was to
1) Open my file manager - on my pc - not their files listing in Shopify admin
2) Drag and drop the properly named photo over to the product page
3) Save
Very frustrating but ultimately solvable. I just wish the agents helped because I wasted a lot of time. I don’t think the files section in Shopify admin is terribly useful.
This is exhausting. I have 3k+ images and this has frustrated me. I'm adding products from csv and require a predictable image names to automate the entire process.
I'm having the same problem and can't figure out how to fix it. None of the above "Fixes" apply to me... so annoying and I think it's seriously affecting my images ranking in google
Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024The Hydrogen Visual Editor is now available to merchants in Shopify Editions | Summer '...
By JasonH Sep 2, 2024Note: Customizing your CSS requires some familiarity with CSS and HTML. Before you cust...
By JasonH Aug 12, 2024