Invoice Ninja is a Laravel application, so its media handling does not resemble a traditional CMS media library. Company logos, client document attachments, generated invoice PDFs, backups, and cached framework data all live under the storage/ directory tree, while publicly reachable assets are exposed through a symbolic link into public/storage. On a shared account this layout causes two recurring problems: disk usage climbs faster than customers expect because PDFs and backups accumulate silently, and logos or document previews fail to load because the storage symlink is missing or points to the wrong path after a migration. Understanding where each asset type is written is the starting point for any meaningful optimization.
How Invoice Ninja stores media and why disk usage grows
The application keeps uploaded and generated files under storage/app/public and storage/app, with framework caches under storage/framework and logs under storage/logs. Company logos uploaded through Settings → Company Details are written to storage/app/public/ inside a per-company hashed folder. Generated invoice, quote, and credit PDFs are cached to disk when you use the server-side PDF engine, and these files are not aggressively purged, so a busy account that emails hundreds of documents per month will see storage/app swell over time. Database and file backups triggered from the admin area add more weight, and if the queue is misconfigured, failed job payloads can linger too.
You can inspect exactly what is consuming space without any shell access. In DirectAdmin open File Manager, navigate into your Invoice Ninja document root, and drill into storage/app, storage/framework/cache, and storage/logs. The File Manager shows folder sizes, which makes it easy to spot a multi-hundred-megabyte laravel.log or a backup folder full of old archives. A bloated storage/logs/laravel.log is extremely common on shared hosting because PDF rendering and mail errors are verbose; it is safe to open the file, confirm it is only log output, and delete it so the application recreates a fresh empty file.
Before deleting anything, confirm the difference between genuinely needed public assets (logos, signatures, uploaded client documents) and disposable cached output (generated PDFs, compiled views, old backups). Removing files from storage/framework/cache and storage/framework/views is harmless because the framework regenerates them on the next request. Removing uploaded logos is not harmless, so treat storage/app/public with care and only trim backup archives you have already downloaded.
Fixing the public storage link and logo display
Logos and publicly served assets only appear if public/storage correctly links to storage/app/public. On shared hosting this symlink frequently breaks after you move the account, restore a backup, or change the document root, because many backup tools do not preserve symlinks. When the link is broken you will see missing logo images on invoices, broken image icons in the admin, and 404 responses for URLs under /storage/.
The clean way to recreate the link is the artisan command php artisan storage:link, but on shared hosting you usually cannot run arbitrary CLI commands reliably. If your plan exposes a terminal in DirectAdmin or the Hostiso Client Portal, run it from the application root. If it does not, you can recreate the behavior manually in File Manager: delete any stale public/storage entry, then use the File Manager symlink or "create link" option to point public/storage at the absolute path of storage/app/public. Confirm the target resolves inside your own home directory and not to a path from the previous host.
You must also make sure the application knows its own URL so generated links are correct. Edit the .env file in the application root through File Manager and verify APP_URL matches your live domain exactly, including https://. A mismatch here produces logos that load locally but break in emailed PDFs. After changing .env, clear the config cache by deleting the files inside bootstrap/cache (specifically config.php if present) so the new value is read on the next request.
Optimizing logos and controlling upload size
Invoice Ninja embeds the company logo into every generated PDF, so an oversized logo directly inflates every document and slows rendering. The application does not run server-side image recompression on upload, which means a 2 MB PNG exported from a design tool stays 2 MB. Optimize the image before you upload it: resize the logo to a sensible display width (roughly 400–600px wide is plenty for invoices), export as an 8-bit PNG or a compressed JPEG, and keep the file under about 150 KB. A smaller, correctly sized logo reduces PDF generation time and the disk footprint of every cached document.
WebP and AVIF are excellent for web delivery, but Invoice Ninja's PDF pipeline and some email clients handle PNG and JPEG most reliably, so keep logos and signatures in those formats rather than converting them to WebP. Where WebP genuinely helps is the browser-facing admin interface and any public client portal pages. You can let LiteSpeed negotiate modern formats for static assets it serves, but do not force logo conversion that the PDF engine then cannot embed.
To keep uploads from overwhelming the account, set sensible PHP limits through your per-directory controls. Using DirectAdmin → PHP Selector (or the Select PHP Version editor) you can adjust upload_max_filesize, post_max_size, and memory_limit. Alternatively create or edit a .user.ini in the application root:
upload_max_filesize = 8M
post_max_size = 12M
memory_limit = 256M
max_execution_time = 120
Keeping upload_max_filesize modest discourages clients and staff from attaching huge scans, while memory_limit at 256M gives the PDF renderer room to work without triggering fatal errors you would otherwise find in storage/logs/laravel.log. Changes to .user.ini apply after the Fcgid/LSAPI process recycles, which typically takes a minute or two.
Serving assets efficiently and ongoing housekeeping
Static media served from /storage/ should be cached by the browser so repeat views of the admin and client portal do not refetch logos on every page. Add caching and compression rules to the .htaccess in your public directory (not the application root), so they apply to LiteSpeed's static handler:
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/webp "access plus 1 month"
ExpiresByType image/svg+xml "access plus 1 month"
</IfModule>
<IfModule mod_headers.c>
<FilesMatch "\.(png|jpe?g|webp|svg|css|js)$">
Header set Cache-Control "public, max-age=2592000"
</FilesMatch>
</IfModule>
LiteSpeed honors these directives natively and will also apply GZIP/Brotli compression to text assets, reducing the bandwidth cost of the admin interface. If you front the site with a CDN through the Hostiso Client Portal or an external provider, point it only at static asset paths and leave the dynamic application and PDF endpoints served directly, since those responses are user-specific and should not be cached.
For recurring housekeeping, schedule a lightweight cleanup rather than letting disk fill until uploads fail. Periodically clear storage/framework/cache and old entries in storage/logs through File Manager, download and then delete superseded backup archives, and keep the generated PDF cache in check. If you have already configured scheduled tasks for the queue, the same cron entry runs Laravel's scheduler, which handles routine pruning when enabled in your version. Pair that with the database-side hygiene habits described in our companion write-up on performance and database cleanup on shared hosting, and the account stays within quota while logos, uploads, and PDFs keep rendering cleanly.