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

Lack of Interest Provide option to disable Image Resize

Discussion in 'Closed Suggestions' started by AndyB, Nov 6, 2013.

  1. AndyB

    AndyB Well-Known Member

    It would be a nice feature in the Admin Control Panel to be able to disable the Image Resizing feature. This is the feature that allows a user to click on an image to see the full size.

    The main reason I dislike this feature is that it interferes with tablets use. On a tablet like the iPad when you scroll the page, often one will inadvertently invoke the Image Resize as they scroll. I have found that the Image Resize is seldom used and the tooltip that pops up when you hover your mouse over an image is distracting.

    Here are instructions for those that would like to disable Image Resize on their forum:

    Edit the following file:


    Line 5192

        XenForo.BbCodeImage = function($image) { this.__construct($image); };
    XenForo.BbCodeImage.prototype =
    __construct: function($image)
    /* added by andy - add return to disable resizing */
    Note to use the full javascript code you need to follow the instructions here:

    xf_phantom likes this.
  2. xf_phantom

    xf_phantom Well-Known Member

    You don't need to edit any core files;)

    This code should remove the eventhandler
    $(document).ready(function() {
    AndyB likes this.
  3. Brogan

    Brogan XenForo Moderator Staff Member

  4. AndyB

    AndyB Well-Known Member

  5. Brogan

    Brogan XenForo Moderator Staff Member

    How can I limit the size of images in posts and conversations?
    Add this to the EXTRA.css template:
    .message .messageContent .messageText img {
    max-width: 50%;
    Adjust the percentage to suit, or substitute for a set pixel size.
    Note that the images will still zoom to full size when clicked. To prevent that append the max-width with !important, for example max-width: 50% !important;.
    AndyB likes this.
  6. AndyB

    AndyB Well-Known Member

    Thank you, Paul.

    Using the EXTRA.css and adding the following code works perfectly to disable the Image Resize function:

    .message .messageContent .messageText img {
        max-width: 100% !important;

Share This Page