Unable to view png/jpg/jpeg documents

Unable to view png/jpg/jpeg documents

Running on nginx, php8.1.


When i upload a PDF as a document that seems to work but other than that it doesn’t work.

Also when i do a health check it says “unable to check CLI version”


Are there any errors in the browser console?

Also, are you able to test with the React app?

TypeError: a.default.detectStore(…) is undefined h1-check.js

unreachable code after return statement main.foss.dart.js

GET https://www.exampledomain.com/documents/SkJWmE35JH91LvB7NRctIKXGRob7hmX9k1qZ5BuJ.jpg?=&t=1703518777328

Status 404
Transferred1.51 kB (2.97 kB size)
Referrer Policystrict-origin-when-cross-origin
Request PriorityHighest
DNS ResolutionSystem

Error: please check that Invoice Ninja v5 is installed on the server

Have you tried with the React app?

Just tested with react app after going to expenses → documents → click on image file to view.

404 | Nothing to see here!

In error log "directory index of “/home/username/web/domain.com/public_html/” is forbidden, " request: “GET / HTTP/2.0”

@david do you have any suggestions?


I found this in my nginx conf

location / {
	try_files $uri $uri/ /index.php?$args;

	location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|woff2|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|webp|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
		expires 30d;
		fastcgi_hide_header "Set-Cookie";

	location ~ [^/]\.php(/|$) {
		try_files $uri =404;

		include /etc/nginx/fastcgi_params;

		fastcgi_index index.php;
		fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

		fastcgi_pass unix:/run/php/php8.2-fpm-domain.org.sock;

		include /home/html/conf/web/domain.org/nginx.fastcgi_cache.conf*;

After i removed png jpg and jpeg the pictures start to work. Do you know what is the impact of removing those from the block?

@david can you please advise?