2018-09-07, 10:35 PM
So I have a forum running vBulletin 4 and is way past the point that I need to migrate to new forum software. I have decided to use MyBB as it fits most my needs, that being said our forum is image heavy and we needed a plugin that would resize images on the fly as they are uploaded to reduce storage space on the server.
I have tried all the other resizing plugins that i could find, but they seem to only resize the displayed image and not the actual image stored(could be wrong on this). Anyway here is my first attempt at a MyBB plugin. it is Alpha and not recommended for live sites.
this plugin uses MyBB thumbnail code to resize the image after upload and name change but before the actual thumbnail is created.
I am looking for any comments good, bad or indifferent to help me develop this plugin ie.. features, good coding practices and so on
https://github.com/CoolMoon1/MyBB-Image-Upload-Resize
Image Upload Resize (IUR)
features:
features working on:
Default upload settings for PHP is 2M, this plugin will not/cannot change that. If you have access to your php.ini file you can change the
"upload_max_filesize" The maximum size of an uploaded file.
"post_max_size" Sets max size of post data allowed. This setting also affects file upload. To upload large files, this value must be larger than upload_max_filesize. Generally speaking, memory_limit should be larger than post_max_size.
you may need to ask your hosting provider to increase these value if you do not have access.
Thanks CoolMoon
I have tried all the other resizing plugins that i could find, but they seem to only resize the displayed image and not the actual image stored(could be wrong on this). Anyway here is my first attempt at a MyBB plugin. it is Alpha and not recommended for live sites.
this plugin uses MyBB thumbnail code to resize the image after upload and name change but before the actual thumbnail is created.
I am looking for any comments good, bad or indifferent to help me develop this plugin ie.. features, good coding practices and so on
https://github.com/CoolMoon1/MyBB-Image-Upload-Resize
Image Upload Resize (IUR)
features:
- resizes images on the fly as they are uploaded
- max width and height for new image while respecting ratio
- setting for jpg compression (v0.2)
features working on:
- override setting for admins and moderators to upload larger images(extra button maybe?)
- ability to resize directories without breaking posts.
Default upload settings for PHP is 2M, this plugin will not/cannot change that. If you have access to your php.ini file you can change the
"upload_max_filesize" The maximum size of an uploaded file.
"post_max_size" Sets max size of post data allowed. This setting also affects file upload. To upload large files, this value must be larger than upload_max_filesize. Generally speaking, memory_limit should be larger than post_max_size.
you may need to ask your hosting provider to increase these value if you do not have access.
Thanks CoolMoon