: SEO Dynamic Image filename I have product images on website. In 'images' directory they are present as 1.jpg, 2.jpg and so on. 1, 2 are product ids from database and therefore I have put images
I have product images on website. In 'images' directory they are present as 1.jpg, 2.jpg and so on. 1, 2 are product ids from database and therefore I have put images name as product id (as it would be easier to add/update images) for a product.
For SEO, I have read it is good to have filename something like product-name.jpg (in this case) etc. I want to keep filename as Id based only in images directory but in tag I want to have filename something like src='images/product-name.jpg'. This could be achieved by .htaccess where product-name.jpg would render images/1.jpg.
I want to know in this case for SEO purpose, filename being considered would be product-name.jpg or 1.jpg as actual path in fileserver is images/1.jpg?
More posts by @Pierce454
1 Comments
Sorted by latest first Latest Oldest Best
Image names primarily help image search and not content search so much. I do recommend that image names reflect what the image is.
This does help search engines to know what the image is and how it relates to the content. Image names help support content semantics where the file name matches using semantic topical analysis. Otherwise, where the image file name does not match, it lends no additional semantic topical support. The effect is small, but beneficial.
While I do recommend, if at all possible, using a real file name that semantically reflects what the image is, using .htaccess to rewrite (not redirect) the request should be transparent. It is a purely internal process and should satisfy the request for the file name within the HTML just fine. Would I do this? No. I would rework the system so that the database can provide a more meaningful file name when rendering the HTML. I do get how it is far simpler to take the product ID and simply look for an image of that name. I do get it - honest I do. However, for systems that I have written, taking these short-cuts often cost you something. It can be inflexibility, more work, etc. Either way, you should be fine.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.