PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Control over ALT and TITLE tags for images in posts

  1. deadhippo

    I don't know if this feature already exists but I couldn't find it. I am letting users create posts through Gravity and they need to upload an image. They have quite a few fields to fill in already so I don't want to ask them to fill in alt and title tags as well but I do want my images to have them because of the SEO benefits. I wanted to be able to use the other data provided by the user to automatically generate the tags. For example, some standard text combined with the post title. Is this possible?

    Posted 13 years ago on Sunday December 19, 2010 | Permalink
  2. It's not a built in feature to pre-populate the image meta fields with the value of other fields, it's a good idea so we can look into it. Practically anything is possible using hooks, but it depends on what your skill level is with WordPress development and PHP.

    Posted 13 years ago on Monday December 20, 2010 | Permalink
  3. deadhippo

    An easier option may be to allow the user to insert the image url without the HTML.

    eg. hxxp:// instead of <img src="hxxp://" /> and then we can easily add our own alt and title tags.

    Posted 13 years ago on Monday January 3, 2011 | Permalink
  4. It is possible to get the image URL itself, without the HTML when using the form field variables. You doing this by adding :src at the end of the image form field variable.

    Posted 13 years ago on Monday January 3, 2011 | Permalink
  5. deadhippo

    I know this is an old post but I didn't understand it and I put it away to check on it later but unfortunately I don't quite understand what I need to do to get the image url. Could you explain it a little more clearly. Sorry.

    Posted 12 years ago on Sunday November 6, 2011 | Permalink
  6. The image merge tag, in your content template, will look like this

    <a href="{My Post Image:1:full:URL}"><img src="{My Post Image:1:medium:url}" /></a>

    That assumes form field 1 of you form is called "My Post Image" and you want to link to link the medium sized image to the full size image. If you just want to use your own alt and title tags, it might look more like this:

    <img src="{My Post Image:1:medium:url}" alt="merge tag for what you want as alt" title="merge tag for what you want as title" />

    Use the drop down to add the form fields to your content template. The only change you will need to make is add the ":url" inside the merge tag.

    Here's another explanation:

    Posted 12 years ago on Tuesday November 8, 2011 | Permalink