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

XF 1.2 Resize big Image

Discussion in 'XenForo Questions and Support' started by BamBam, Aug 17, 2013.

  1. BamBam

    BamBam Active Member

    Hey,

    Anybody know how to Resize Images in XenForo. Here is a Test Picture from my Forum. As you can see this Picture is way to big. So, is there a Addon or Settings where i can resize this Images automatically?

    Thx

    test thread5.png
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Set the attachment options in the ACP.
     
    StonePilot and BamBam like this.
  3. BamBam

    BamBam Active Member

    Hm, i have set it to 800 x 800. Thats good for me, really nice. Not to big, not so small. But i have noticed, that when i set the Size to 800 x 800, i cant click on the Picture to see it in Full Size. Is there any Option for this? Cheers. (y)
     
  4. MattW

    MattW Well-Known Member

    XenForo will resize larger images down to those dimensions, which is why there is no larger image
     
    BamBam likes this.
  5. Brogan

    Brogan XenForo Moderator Staff Member

    It sounds like you want to allow large images which will zoom to full size when clicked, but limit the size they appear in posts?

    In which case add this to EXTRA.css:
    Code:
    .message .messageContent .messageText img {
    max-width: 50%;
    }
    Change max-width to suit, you can set it to 800px instead of a percentage if you wish.
     
    muhyal, Valter, Dennis B and 5 others like this.
  6. PyroM

    PyroM Active Member

    Thanks, Brogan! Am I right, that a percentage value would reduce the size of any IMG in post text, even if they are very small - but setting it to a specific size (eg. 800px) would not?! Would the responsive design be effected - I assume not?!
     
  7. Brogan

    Brogan XenForo Moderator Staff Member

    The percentage relates to the post container width, not the image.

    If you want to set them to a specific max size, use pixels.
     
    zuardin and PyroM like this.
  8. PyroM

    PyroM Active Member

    I've tried it in the meantime:

    Fixed pixels can break the responsive design (eg. 640px), but percentage works perfectly and scales to the wished size, if there is enough space and reduces responsive the size. GREAT, thank you!
     
  9. Brogan

    Brogan XenForo Moderator Staff Member

  10. Gobee129

    Gobee129 Member

    I want to reseize them manually in the message. something like [img=250x250]url of the image[/img]

    This is a must-have, if I want to put multiple images into the same line! I dont wanna download the pictures and reseize them on my PC, or reseize them with an imageupload site, I am used to do it with the simple code shown above. But that doesnt work on Xenforo. Is there a smilar way?
     
  11. Jeremy

    Jeremy XenForo Moderator Staff Member

    You will need custom BBCode / add-ons to overwrite the standard IMG to allow resizing.
     
  12. Gobee129

    Gobee129 Member

    I have this BB code creator. Any tutorial on how to create the resize code?^^

    bb.png
     
  13. cclaerhout

    cclaerhout Well-Known Member

    @Gobee129
    Use the bimg bb code of this addon. Note that I still have to implement a function that will convert fixed width in fluid width when a mobile device is detected to match with the responsive styles.
     
  14. Gobee129

    Gobee129 Member

    So I have to install your addon and then I can use [img=***x***] ?
     
  15. cclaerhout

    cclaerhout Well-Known Member

    Not for the bimg tag. Only the width (in px or %). The height will depend on the width to keep the ratio. I could add the height but a none homothetic transformation just makes the image ugly. So I don't plan to implement it. But you have this option in other bbcodes: accordion, tabs, slider and the new table bbcode inside the tinyquattro for which I've used a new system to match the width AND/OR the height.
     
  16. Gobee129

    Gobee129 Member

    well, since I know about BBCode since... hmm 2 days, I dont really get what you tell me^^ except for the heigth part. Let's say I dont care about the height and would just want to adjust the width, what do I have to do to get this implemented? Do I need to install your addon, or can I use the BBCode creator from xenforo and achieve this with replacement codes andd options? :/
     
  17. cclaerhout

    cclaerhout Well-Known Member

    Read the presentation of the addon I've mentioned.
     
  18. Gobee129

    Gobee129 Member

    thats a really extensive addon. Sadly, I dont have server access, and a simple xml installation via the BBcode creator doesnt work.

    Can you send me an XML file that only covers the width-resizing that I am looking for, so that I can import it via the BBcode creator?
     
  19. cclaerhout

    cclaerhout Well-Known Member

    No, I can't. This addon is working with a framework that fetches XenForo templates. Again, read the addon description.
     
  20. Gobee129

    Gobee129 Member

    Well, I looked at all the installation guides from your and the required addon(s), but I cant install any of them, since I have no access to any forum folders like "upload" and I dont have the auto installer, only the default addon installer from xenforo. thats why I had hoped for a simple xml similar to this, since I only need the resize option (although all the other options your addon provides are pretty handy)

    anyway, thx for your time!!
     

Share This Page