MyBB Community Forums

Full Version: Built-in huge image resizing
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Frankly, I don't see why we don't already use GD for this as a core feature because MyBB's default CAPTCHA already uses GD or ImageMagick to generate itself, so I'm suggesting that instead of a plugin (which isn't a graceful solution as it could cease being maintained at any time and this is a rather basic feature in my opinion), we implement GD- or JavaScript-based automatic image resizing as a core feature. No other package has this as far as I know.

It'd also be configurable, obviously, like, say, any image over x pixels in height/width or x percent of the overall post container size would be automatically resized to fit in the container.
Pavemen is working on a plugin like this at my request.

Which reminds me I need to give him the test results.. Confused
I honestly believe a better solution would be to simply add img other default BBcodes to the normal list. And not make them editable (yes adding [ img ] code again will over rule the default one but still), that way you could simply add the javascript code directly to the image tags. Since for this you really do not need a plugin at all.
We already have some sort of undocumented image resizing, for those interested in doing it manually.

[Image: logo3w.png]

[img=100x100]https://www.google.com/images/srpr/logo3w.png[/img]

We could probably just drop a simple jQuery plugin in with MyBB for 1.8. We'll see what Tomm has to say as he's the lord of the jQuery conversion. Shy
I like to think I know a fair bit about MyBB... and the above I did not know. Thanks Nathan!
Always like to use this :

<a href="javascript:void(0)" onclick="window.open('$1', '', 'toolbar=no');myWindow.focus();"><img src="$1" style="max-width: 400px; max-height: 400px;" alt="Image" title="Click Picture To Enlarge" /></a>

Saw it here on the forums but not sure where anymore.
The point of the plugin that I requested from Pavemen is not just that it resizes the image "cosmetically"- it is truly resized. This means less storage space taken on the server and that we are loading images at the optimum KB size - a saving on bandwidth. It also means I don't need a javascript file to resize the image (another request saved). Better to solve it on upload than on display imo.

This is the original request : http://www.communityplugins.com/forum/sh...hp?tid=251
The point of this request is that it isn't implemented as a plugin. Besides, your plugin request is private, I'd gather, which means nobody else but you will benefit from it. Wink
Well, I said to Pavemen that I had no objection at all to him making it a subscriber download on his site. So it would be available.

In the meantime - as far as none plugins are concerned - I guess you can use the image resize built in - which depends on users keeping the dimensions correct - using a js solution, or doing what I do right now which is use css.

Unless of course MyBB developers decide to actually resize at time of upload (and looking at Nathan's reply it seems not) this plugin might be the only way to do what you are asking.
Mhm would be maybe nice to someday actually get a pure image uploading plugin (not sure what pavemen is making for you leefish). That has:

- Batch uploading (uploadify for example).
- auto thumbnails creator.
- add bb-code automatically to the editor field after uploading.

And would fully go around the attachment system.
Pages: 1 2