5

I'm use RoR 3.2 and carrierwave gem for upload images.

I want will do SEO optimization for uploaded images filenames. For example I have model Car(attributes: :id, :name, :avatar(carrierwave image uploader for this)) and model Brand(attributes: :id, :name).

After upload avatar for car, it creates an image with name test1.jpg. I want display this filename as brand_name-car_name-filename.jpg. And if the brand (or car) name changed - consider and display the correct brand name and car name.

Is this important for SEO?

migrated from stackoverflow.com Jun 27 '14 at 13:43

This question came from our site for professional and enthusiast programmers.

  • 1
    When you generate the Carrierwave uploader file rails generate uploader Avatar it gives you a store_dir method which you can override. For example: uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.name} (not tested). Similar question stackoverflow.com/questions/12738700/… – Mark Kenny Jun 24 '14 at 21:17
  • thanks Mark. but if brand(or car) name changed - I need recreate this file(change name). and if cars for this brand very more - need do it for all cars. – Artem Pecherin Jun 24 '14 at 21:26
  • 1
    You could change the filename on your filesystem using the File class with the rename class method File.rename('old_car_brand.jpg', 'new_car_brand.jpg') (or something like that). You could trigger this if the name attribute is changed, (remembering to also change the avatar attribute to reflect the new name too) – Mark Kenny Jun 24 '14 at 21:49
  • @MarkKenny, I thought to do everything exactly the same. But I doubt the optimality of such a decision. – Artem Pecherin Jun 24 '14 at 21:54
  • Another approach could be to create a new record in the database with a new avatar (file upload). You would then set the old record status attribute to "Archived". This might be good for versioning and Google will like it too. – Mark Kenny Jun 24 '14 at 22:13
3

Image filename is not very important. Because google know perfectly this truth that some Content Management Systems and many custom-made websites do not allow to edit image filenames and many images uploaded with unrelated filenames.

Also many Web.2 and social websites, controlled by their users (Not admin) and images uploaded with dirty filenames. So Google can not count this factor as an important factor.

Just focus on these main and powerful factors:

  • The alt attribute
  • The title attribute
  • Text around the image
  • The title attribute of Anchor text for image links.
  • Using images in related page with related H1 and title tag.
  • Image quality and Image size.
  • Sharing images in Social network websites specially Pinterest.
  • Sharing images in other websites by using your image URLs.
  • Creating natural backlinks pointed to your image URLs.
  • All Page-Level ranking factors(Pages that include your images).
  • All Domain-Level ranking factors.

See Domain-Level and Page-Level ranking factors here.

  • 1
    Webmaster should not use alt and title tag together, if they can't provide different value on that, it is same like you write some content on` <p>` tag and later you write same content with <strong> tag. – Goyllo Dec 11 '16 at 6:20
0

The filename of the image is just one of the items that image search engines (like Google Image Search) use to rank images. They also can get text from:

  • The alt attribute of the image
  • The title attribute of the image
  • Text that is in a <div> that directly surrounds the image and displays on the page right next to the image

User visible text seems to be a stronger signal than meta text (such as alt text or file name), so if I were to choose one of the two, I wouldn't worry too much about the file name.

You also need to pay attention to two other major factors to get your images to rank:

  • PageRank -- The number and quality of inbound links (even internal links) into the page that has the image
  • Image quality -- Full color and very large images rank much better than lower quality images.
0

File names are utterly important and a known secret of SEO houses.

If you name a image of a puppy - image124.jpg Google doesn't know what that image really is or what it's relation is to your website.

Now same picture of the puppy if you name that picture - puppy-playing-on-grass.jpg and the alt text is relaxing puppy and the content on the page is about a puppy trust me Google can safely say that is most certainly a picture of a puppy.

When it comes to SEO, it's important to use acceptable keywords to help your webpage rank on search engines. Creating descriptive, keyword-rich file names is absolutely crucial for image optimization. Search engines not only crawl the text on your webpage, but they also search for keywords within your image file names.

A good habit to get into is to look at your website analytics, and see what phrasing patterns your customers use to perform searches. Determine the most common naming patterns they use, and apply that formula to your image naming process.

If you are not going to get that detailed, just be sure to use good keywords when naming your images.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy