Lack of interest Provide option to disable Image Resize


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:


Well-known member
You don't need to edit any core files;)

This code should remove the eventhandler
$(document).ready(function() {


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;.


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;


Active member
Sorry for picking up such an old thread but I got a question regarding limiting the size of images.

@Brogan, your solution works perfectly in our forum :) I just installed recently the Resource Manager from XenForo and there I have a similar "problem" now. You can hover over the image and it shows the text: "Click this image to show full size". Once you clicked on it, the picture scales up to the native resolution.

Any way of restricting it the same way as it works with the messageContent?

Regards :)