How MyBB actually stores and serves media
MyBB does not keep a single tidy media library. Uploaded files land in several distinct locations depending on their type, and each behaves differently under load. Post attachments are written to the /uploads/ directory at your document root, with thumbnails generated alongside them when an image exceeds the dimensions configured in the Admin CP. User avatars go into /uploads/avatars/, and group images, reputation icons, and theme assets live under /images/. Every one of these files is served directly by LiteSpeed as a static request, which is efficient, but the sheer count of files matters more than their total size on a shared account.
The reason storage pressure creeps up on busy forums is that MyBB rarely removes anything. When a post is deleted, its attachment row is cleared from the database, but the physical file and its thumbnail can remain on disk if the deletion path is interrupted or if attachments were orphaned by failed uploads. Over months of activity, the /uploads/ folder accumulates thousands of small files. On CloudLinux shared hosting each of those files consumes an inode, and inode limits are often reached long before the disk quota is. A forum showing only two gigabytes of usage can stall new uploads entirely because it has exhausted its inode allocation on tens of thousands of tiny thumbnail files.
The second issue is image weight on the wire. MyBB resizes uploaded images to a thumbnail for in-thread display, but the full-resolution original is still stored and served when a member clicks through. MyBB has no native WebP or AVIF pipeline, so a 4 MB phone photo posted as an attachment is delivered as a 4 MB JPEG to every reader who opens it. On a forum with image-heavy threads, this inflates bandwidth consumption and slows page rendering, especially on mobile connections. Everything that follows works within the constraints of an unprivileged hosting account: the Admin CP, File Manager, phpMyAdmin, and .htaccess. No server-level image modules or root packages are involved.
Tuning attachment limits and thumbnail generation
The first lever is in Admin CP → Configuration → Settings → Attachments and Thumbnails. The settings here decide how much raw data lands on disk and how many derivative files get created. Start by setting a sensible maximum attachment size. A limit of 2048 KB (2 MB) is generous for a forum and prevents members from uploading unresized multi-megabyte camera files that balloon your /uploads/ directory. The matching PHP ceiling must also allow it, which you control per-site through a .user.ini file in your document root rather than any server config:
upload_max_filesize = 4M
post_max_size = 8M
memory_limit = 256MKeep post_max_size larger than upload_max_filesize so multi-file posts and form fields fit inside the request body. Changes to .user.ini apply after the configured refresh window, typically a few minutes, with no need to restart anything. Confirm the active values in cPanel under Select PHP Version → Options or via a temporary phpinfo() check.
For thumbnails, set the Thumbnail dimensions field to something like 100x100 for the in-post preview. The critical choice is the image attachment resizing behavior. MyBB can automatically resize the stored image down to a maximum width and height on upload, which stops full-resolution originals from ever hitting disk. Enabling a max of around 1280 pixels on the long edge drastically reduces both storage and delivery weight while keeping images perfectly usable in threads. This single setting often cuts attachment storage growth by half or more.
MyBB relies on the GD library for resizing. Confirm GD is active for your chosen PHP version in cPanel under Select PHP Version → Extensions (tick gd) or in DirectAdmin's PHP Selector. Without GD enabled, MyBB silently falls back to storing originals and skips thumbnail creation, which is a common cause of mysteriously bloated upload folders. If thumbnails are not appearing, check your account's local error_log in the document root for GD function warnings before changing anything else.
Serving lighter images with WebP rewrites and a CDN
Because MyBB will not generate WebP itself, the practical approach is to pre-convert static image assets and let LiteSpeed serve the lighter copy when the browser supports it. This works well for your theme images and logos under /images/. Convert those PNG and JPEG files to WebP locally and upload the .webp versions alongside the originals through File Manager, keeping identical base names. Then add a content-negotiation rule to the .htaccess file at your document root:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_ACCEPT} image/webp
RewriteCond %{REQUEST_FILENAME} (.*)\.(jpe?g|png)$
RewriteCond %{DOCUMENT_ROOT}/%1.webp -f
RewriteRule (.+)\.(jpe?g|png)$ $1.webp [T=image/webp,E=accept:1,L]
</IfModule>
<IfModule mod_headers.c>
<FilesMatch "\.(jpe?g|png)$">
Header append Vary Accept
</FilesMatch>
</IfModule>This rule transparently delivers the WebP file to browsers that advertise WebP support while falling back to the original for anything else, with the Vary: Accept header keeping caches correct. It is safest to scope this to static theme directories rather than user-uploaded attachments, since member uploads change constantly and you cannot pre-convert them by hand.
Pair the rewrites with long cache lifetimes so repeat visitors stop re-downloading unchanged media. Add the following to the same .htaccess:
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType image/webp "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
</IfModule>For broader relief, route static assets through a CDN. A pull-zone CDN such as Cloudflare requires no code changes: once your domain's traffic passes through it, images, CSS, and JavaScript are cached at edge locations and served without touching your account on repeat requests, which lowers both bandwidth and CPU on the shared server. If you prefer serving uploads from a separate hostname, MyBB lets you point the forum at a custom asset URL under Admin CP → Configuration → Settings → Site Details and within theme templates, so a CDN subdomain can front the /images/ and /uploads/ paths. The same principles of friendly paths and canonical consistency that matter for forum URL handling apply here, so keep asset URLs stable to avoid breaking cached links.
Reclaiming storage and controlling inode growth
Optimization is incomplete without clearing the debris already on disk. Inside Admin CP → Tools & Maintenance → File Verification, MyBB scans for attachments referenced in the database but missing from disk, and for files that exist without a matching record. The orphaned files it reports are safe candidates for removal and are frequently the single largest source of wasted inodes on an aged forum.
To find the true heavy folders, open cPanel File Manager and inspect /uploads/ and /uploads/avatars/, or use the Disk Usage tool in cPanel which breaks down usage by directory. Before deleting anything in bulk, confirm which attachments are still linked by querying phpMyAdmin against the mybb_attachments table so you do not remove live files. A simple count there tells you how many attachment records exist versus how many physical files you see, exposing the orphan gap:
SELECT COUNT(*) FROM mybb_attachments;Keep the database itself lean as well. Run Admin CP → Tools & Maintenance → Optimize Database periodically, which issues per-table optimization that reclaims space from deleted attachment rows and defragments indexes. If avatar sprawl is the problem, consider setting a remote-avatar policy or tightening the avatar dimension limits so each account produces one small file rather than several oversized ones.
Monitor your inode count from the cPanel home screen statistics panel after each cleanup pass. A healthy forum should see the number drop noticeably once orphaned thumbnails are purged and automatic image resizing is enabled, giving you headroom for future uploads without ever approaching root-level tools. Re-run File Verification on a quarterly schedule, and the combination of capped upload sizes, on-upload resizing, WebP delivery for static assets, and CDN caching will keep a growing MyBB forum fast and well within shared hosting limits.