1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Image alt text

Discussion in 'XenForo Questions and Support' started by onelife69, Jan 20, 2013.

  1. onelife69

    onelife69 Member

    Hi all,

    How can I set the image alt text to default to the thread title, opposed to the current filename?
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Which image?
     
  3. onelife69

    onelife69 Member

    Sorry, I should have mentioned the images that are uploaded as an attachment to a post.
     
  4. Dinh Thanh

    Dinh Thanh Well-Known Member

    So if you have 100 images in a post. All 100 images will have same alt. That's not good.
     
  5. onelife69

    onelife69 Member

    I agree, but we don't have that many attachments in any one post, maybe 5 - 10. At the moment the alt text is reading filename values which mean nothing. For example

    Code:
    <img src="attachments/img_0633-jpg.3924/" alt="IMG_0633.jpg" class="bbCodeImage LbImage" />
    <br />
    <img src="attachments/img_0634-jpg.3925/" alt="IMG_0634.jpg" class="bbCodeImage LbImage" />
    I doubt I can convert my users to change the filename before uploading.
     
  6. Digital Doctor

    Digital Doctor Well-Known Member

    You got that right !

    Xenforo's SEO for images seems pretty rudimentary.

    Ideally it would be nice if an admin could add alt text manually to images.
     
  7. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    For [attach] tags in posts the thread record is not available. But for the list of attachments at the bottom of a post you can edit the attached_files template and use {$thread.title}.
     
  8. onelife69

    onelife69 Member

    Thanks Jake you're the man, that has been implemented and works well. Now to convince my users to attach their images but not insert them :confused:
     

Share This Page