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

Picture Hot Linking Size

Discussion in 'XenForo Questions and Support' started by TazDevilLooney, Aug 3, 2011.

  1. TazDevilLooney

    TazDevilLooney Active Member

    Hi, would there be any way of set all hot linked picture to a set height and width?
    Some of the pictures members are linking to are huge and makes the forum look untidy.
    Any ideas? :D
     
  2. James

    James Well-Known Member

  3. James

    James Well-Known Member

    Code:
    .messageText img{
    width: __px;
    height: __px;
    }
    
     
    TazDevilLooney likes this.
  4. TazDevilLooney

    TazDevilLooney Active Member

    Thanks for the reply James.

    I placed the code in the extra.css and even added !important after the sizes. Made no difference to the hot linked pictures sizes like 4877 × 3515
     
  5. Brogan

    Brogan XenForo Moderator Staff Member

    You need to use the .bbCodeImage class.
     
  6. Blue

    Blue Well-Known Member

    Isn't that controlled by "Maximum Attachment Image Dimensions"?
     
  7. Brogan

    Brogan XenForo Moderator Staff Member

    That is for uploaded images.
     
  8. TazDevilLooney

    TazDevilLooney Active Member

    Soooo what's my options? :whistle:
     
  9. Brogan

    Brogan XenForo Moderator Staff Member

    As I posted above, add some css to EXTRA.css for the .bbCodeImage class.

    .bbCodeImage {
    max-width: 100px;
    max-height: 100px;
    }

    I'm slightly confused though as images will only fit to the container width anyway.
    They will only show full size once clicked.
     
    graham_w and TazDevilLooney like this.
  10. Blue

    Blue Well-Known Member

    Oh OK. I would have sworn that xF already limits linked image dimensions, or at least resizes them when they display and then you click them to see the full size view..

    Edit:
    That's what I thought.
     
  11. Brogan

    Brogan XenForo Moderator Staff Member

    The code I posted above will reduce any embedded images to less than 100% width of the post body.
     
  12. TazDevilLooney

    TazDevilLooney Active Member

    The images leave the container and disapper of the side of the screen.

    .bbCodeImage {
    max-width:860px;
    }

    I had to put it in "bb_code_base.css" for it to work. Smashing job guys. Thanks (y)
     
  13. graham_w

    graham_w Active Member

    Is there a way to add a different image class to leave any bbcode images in the signature alone, or at least resize them differently ?

    Thought I might be able to use .bbcodeimage signature { or something similar but it doesn't seem to make any difference. I'd like to continue using the img bbcode for both signatures and images in posts.
     
  14. graham_w

    graham_w Active Member

Share This Page