• Hi,

    Is there a way to automatically use my post title as alt and title attributes for all of the images in my content (as well as featured image aka post thumbnail)?

    I have already tried SEO Friendly Images Plugin http://wordpress.org/plugins/seo-image/ but it doesn’t give me the desired results.

    Please note that manually inserting alt and title attributes for images in the media editor is not an option, because I have hundreds of Images on my site and I add dozens more daily. I’m looking for an automated way.

    Thanks for your kind help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Do you want to insert the same title and alt tags to all the images? Don’t you think that they can create the problem of duplicate tags?

    Thread Starter mohsin10

    (@mohsin10)

    Yes Krishna, that’s what I want.

    The thing is, a lot images have very vague and non-user-friendly names such as ‘img59595’. Since WordPress currently uses the image name as its alt attribute (and nothing for title if you left it empty when uploading), I bet it neither makes sense to search engines nor the users.

    Using the same alt and title attribute for all images on a page may not be ideal, but it solves my problem.

    Using the same title and alt tags for all images is worse than using different non-user-friendly names such as ‘img59595’ as they are at least different and will not attract penalization from search engines such as Google for multiple duplicates.

    Thread Starter mohsin10

    (@mohsin10)

    Ok, I might not do that. But I’d still like to know how to add alt and title attribute to the featured image thumbnails I’m pulling this way:

    <?php if ( has_post_thumbnail()) : ?>
    
                                <?php the_post_thumbnail(); ?>
                                <?php else : ?>
                                <span class="from_the_portfolio_noimg">
                                <?php endif; ?>

    I do have custom title and tag attribute defined for thumbnail images, but for some reason the alt and title tags are empty on the images rendered on my page. Any idea why?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to auomatically insert image alt and title’ is closed to new replies.