Read-only site not displaying images in subfolders

hello all! im loving silverbullet so far. Ive got a little setup going where i have two docker containers sharing the same source “space” directory. One is read-only for my public site, the other is password protected on a subdomain. This setup has been working flawlessly for me but i just ran into an issue trying to organize my images. If i upload a file (gif in this case) to the root space directory and reference it with ![[file]], it displays the image perfectly on admin and readonly. However, if i put a file in, lets say, /media/file. When i do ![[media/file]] it will display on the admin site, but not on the read-only site.

Could one of you, who have a read-only site, please test and see if you can display images in subfolders?

The specific error im getting on readonly site is:
“The image “https://domain.com/media/file.gif” cannot be displayed because it contains an error.”

Ive tried with pngs and other static images, no luck. Also tried to specifically declare that these files be served directly in the /media directory in my nginx config. I have not been able to solve this issue.

Do you guys have any idea why this is happening?

@zef is this possibly a known bug or do you think its an issue with my environment? ive triple checked all permissions, its for sure not a perm issue.

I’m not sure what the issue was, but i got it working. I think it had something to do with the SB_USER environment variable on the admin.

I changed my admin access solution to use cloudflare access instead of nginx htpasswd and removed the SB_USER. Now its working flawlessly. Sorry for the weird issue guys! lmk if anyone is curious on my setup for a public read-only with an admin access solution.

For anyone needing help, here is my setup blog Hosting SilverBullet.md read-only & admin with Docker, DigitalOcean, Cloudflare, and NGINX