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

Anchor text for uploaded images

Discussion in 'XenForo Questions and Support' started by Ryan Kent, May 11, 2011.

  1. Ryan Kent

    Ryan Kent Well-Known Member

    Is there a method to use anchor text for uploaded images? Something like

    [attach anchor="Big Gorilla Image"]999999[/attach]
    I am thinking of the seo benefits. Yes, I am often reminded things like this make a small difference, but I also know every bit helps.
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Do you mean a text link? You can use the URL tag.

    This code:

    [url=http://xenforo.com/community/attachments/198-gif.14806/]clarus the dogcow[/url]

    Becomes this:

    clarus the dogcow

    I copied the URL of the image I uploaded.

    Attached Files:

    • 198.gif
      File size:
      266 bytes
  3. Ryan Kent

    Ryan Kent Well-Known Member

    I used the wrong choice of words, sorry Jake. I don't know the right term, but I can offer an example.

    In /styles/xenforo there is the XenForo.png file. If I remove or rename that file, when I log into the ACP I see the text "XenForo Logo" where the image normally appears. That is the effect I desire. Text that describes the image, which also takes the image's place in case it does not load for any reason.
  4. Forsaken

    Forsaken Well-Known Member

    You want the alt attribute then.
  5. Ryan Kent

    Ryan Kent Well-Known Member

    Ok, thanks. Is there any way to add the alt attribute to the bbcode for uploaded images?
  6. Brogan

    Brogan XenForo Moderator Staff Member

    The software automatically creates an alt attribute based on the file name.

    Oracle likes this.
  7. Ryan Kent

    Ryan Kent Well-Known Member

    outstanding! reason #431249-b to love XF

Share This Page