2 MINUTE READ | March 12, 2012
Three Simple Tips for SEO'ing WordPress Post Images
Here at PMG we try to blog a lot. Not everyone in the room is a SEO, so when we go back and review blog posts before posting them one of the things that often gets done is optimizing images.
Here are three simple tips to make sure your WordPress post images are optimized.
Image search can drive some website traffic. One of the factors that go into an image ranking in image search is its file name. Choose a descriptive file name, not one that only has meaning to you. wordpress-thickbox-uploader.png is better than blogpost-1.png, for instance. I prefer separating words in file names with dashes rather than using underscores or camel case.
When you upload an image to WordPress, it actually get stored as a “post”. That is, images and other media have their own post type called attachment. This stores the alt and title attributes as well as the location of uploaded image and its alternate size file names. The attachment post type also gives you also sorts of handy functionality. wp_get_attachment_image_src the built in gallery shortcode are two examples.
When you use the alt and title attributes in the uploader, you can easily get those values dynamically on the PHP side of things. WordPress will also take care of adding them to your image when you hit “Insert into Post” as well. It’s also good SEO practice to at least include the alt attribute, of course.
Alts/titles are also pulled in for post thumbnails and the gallery automatically. Here’s the gallery for this post…
Look at that nice file name.
Please use these.
I generally dislike two WordPress core features: tags and attachment pages. Attachment pages are usually worthless pages that get linked to on accident by unsuspecting users. That’s not to say that attachment pages can’t be awesome. Just take a look at Matt’s attachment pages. For the average WordPress user all they do is create a bunch of, in SEO terms, low quality pages on a site.
So before hitting “Insert into Post”, chose to link to nothing or to the image file itself.
Stay in touch
Subscribe to our newsletter
9 MINUTES READ | May 6, 2020