seo - how to change image filenames using javascript -
i'm working site has on 50,000 products within database. problem file names cryptic problem: 51h5zpsj7il , was: 51i5cvruyrl. need change these more seo friendly names such "introduction-to-programming" or "c++-for-everyone". client sells products on amazon , therefore grabs these image names them. i've written code change alt, don't know how rename file isn't ours. able come technique have these files added imgs , work there?
for convienenvce, js code changing alt text, not src text needs changed seo:
var title = document.getelementbyid("product-description").getelementbyclassname("product-title")[0].innerhtml, img = document.getelementbyid("main-image").getelementsbytagname("img")[0].alt=title;
from can tell, you're pointing image file on amazon's servers, have random image names. pretty summed when said, "i don't know how rename file isn't ours." it's not yours, can't.
what you'd need copy images own server, can name them whatever like. or, perhaps write code on own server processes friendly image name 301 redirect
correct image on amazon. latter approach save having store images yourself.
i question why want rename images. knowledge on seo isn't extensive, see no advantages of using friendly image names within html. long page urls friendly, should fine.
Comments
Post a Comment