Lack of interest Provide option to disable Image Resize

This suggestion has been closed automatically because it did not receive enough votes over an extended period of time. If you wish to see this, please search for an open suggestion and, if you don't find any, post a new one.

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:

js/xenforo/full/xenforo.js

Line 5192

PHP:
	XenForo.BbCodeImage = function($image) { this.__construct($image); };
	XenForo.BbCodeImage.prototype =
	{
		__construct: function($image)
		{
			/* added by andy - add return to disable resizing */
			return 
...

Note to use the full javascript code you need to follow the instructions here:

http://xenforo.com/community/threads/how-to-run-uncompressed-javascript-files.62123/
 
Upvote 2
This suggestion has been closed. Votes are no longer accepted.
You don't need to edit any core files;)

This code should remove the eventhandler
Code:
<script>
$(document).ready(function() {
  $('img.bbCodeImage').unbind();
});
</script>
 
How can I limit the size of images in posts and conversations?
Add this to the EXTRA.css template:
Code:
.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;.
 
Thank you, Paul.

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

Code:
.message .messageContent .messageText img {
    max-width: 100% !important;
}
 
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 :)
 
Back
Top Bottom