Company logo retrieved via non-public storage directory

I use version 5.5.63 and I have a problem with the company logo not being displayed on the tab where it can be uploaded neither on invoices (only broken image shows). Here are the steps to reproduce.

  1. Upload company logo
    In the InvoiceNinja’s menu navigate to Settings (at the bottom), click Company Details under Basic Settings. Then choose the logo tab and click the button “Upload logo”. Upload a PNG file.

  2. Logo is missing
    After doing this there is no POST error message which means that the image was successfully uploaded and saved on the server. Still, the logo is not displayed afterwards. In the console there is an 403 error shown.

  3. Follow image file’s link
    Following the link of the image file https://[DOMAIN_NAME].com/storage/fABNhFfQkiBuGURLEeqhqNxjCgCgnHgK/l8vAD2hnCcjtP3RRMk2SNh9XoOVJwCwZeMGuSZbB.png I receive an HTTP 403 error again.

  4. File name check
    I just noticed a problem in the URL name. On the server the file is stored in /public/storage/… directory while the HTTP request looks for the file in /storage (without the /public directory first). If I add /public directory to the URL I can see the image: https://[DOMAIN_NAME].com/public/storage/fABNhFfQkiBuGURLEeqhqNxjCgCgnHgK/l8vAD2hnCcjtP3RRMk2SNh9XoOVJwCwZeMGuSZbB.png

  5. Possible solutions
    Missing /public from View Link in Data Visualizations · Issue #3410 · invoiceninja/invoiceninja · GitHub Firstly, it is suggested to add /public to APP_URL in .env file. Secondly, it is suggested to add a rewrite rule the .htaccess. I tried both solutions but none of them worked.

Any help much appreciated.


@david do you have any thoughts?

after adding /public/ to your APP_URL

please try reloading the cache by running

sudo -u www-data php artisan optimize

or by visiting in the browser your URL with /update?secret=

Thanks @david . I added /public/ to the APP_URL and visited the browser with /update?secret= . The only effect was that /public is now appended to the browser URL. Still, the image is being loaded without /public directory. I also ran php artisan optimize inside InvoiceNinja directory which prompted “Caching the framework bootstrap files. config 27ms DONE. routes 64ms DONE”. Still no success loading my company logo. Unfortunately, I cannot run the command with sudo as I don’t have the permission. Anything else I can try? Thank you.