Images disappear when STORAGE_IMAGE_TYPE=local_secure #2232

Closed
opened 2026-02-05 03:24:24 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @Redsandro on GitHub (May 2, 2021).

Describe the bug

When adding the .env var STORAGE_TYPE or STORAGE_IMAGE_TYPE with a value of local_secure overriding the default value of local to protect image content with personal information from being publicly accessible, as descripbed here, all book and shelve cover images and user images disappear.

Steps To Reproduce
Steps to reproduce the behavior:

  1. Create a new BookStack instance with default settings
  2. Create a new shelve with a cover image. Create a new user with a user image.
  3. Restart BookStack with STORAGE_TYPE=local_secure set.
  4. See images disappear even though you are logged in.

Expected behavior

Everything visible as usual while logged in.

Your Configuration (please complete the following information):

  • BookStack v21.04.3
  • Docker from LinuxServer as found on BookStack page.
Originally created by @Redsandro on GitHub (May 2, 2021). **Describe the bug** When adding the `.env` var `STORAGE_TYPE` or `STORAGE_IMAGE_TYPE` with a value of `local_secure` overriding the default value of `local` to protect image content with personal information from being publicly accessible, as descripbed [here](https://www.bookstackapp.com/docs/admin/upload-config/), all book and shelve cover images and user images disappear. **Steps To Reproduce** Steps to reproduce the behavior: 1. Create a new BookStack instance with default settings 2. Create a new shelve with a cover image. Create a new user with a user image. 3. Restart BookStack with `STORAGE_TYPE=local_secure` set. 4. See images disappear even though you are logged in. **Expected behavior** Everything visible as usual while logged in. **Your Configuration (please complete the following information):** - BookStack v21.04.3 - Docker from [LinuxServer](https://hub.docker.com/r/linuxserver/bookstack) as found on BookStack page.
Author
Owner

@ssddanbrown commented on GitHub (May 2, 2021):

Hi @Redsandro,
When changing that option did you move your image uploads as described in the documentation?:

If you’d like to switch to this option from the default local storage system you’ll first need to migrate existing image uploads to the image folder listed above.

@ssddanbrown commented on GitHub (May 2, 2021): Hi @Redsandro, When changing that option did you move your image uploads as described in the documentation?: > If you’d like to switch to this option from the default local storage system you’ll first need to migrate existing image uploads to the image folder listed above.
Author
Owner

@Redsandro commented on GitHub (May 2, 2021):

@ssddanbrown apologies, it appears I didn't read all the relevant parts!

I assumed it would break the gallery and stuff. Can I keep the pre-existing book contents in the old (non-secure) location? Because moving embedded book content causes all the links in book content to break, and I'd need to ask all authors/editors to fix their books. I prefer not to do that (or edit it all myself).

-edit- Book content as in uploads other than cover images and user avatars.

@Redsandro commented on GitHub (May 2, 2021): @ssddanbrown apologies, it appears I didn't read all the relevant parts! I assumed it would break the gallery and stuff. Can I keep the pre-existing book contents in the old (non-secure) location? Because moving embedded book content causes all the links in book content to break, and I'd need to ask all authors/editors to fix their books. I prefer not to do that (or edit it all myself). -edit- Book content as in uploads _other_ than cover images and user avatars.
Author
Owner

@ssddanbrown commented on GitHub (May 2, 2021):

@Redsandro It should not break anything apart from maybe the globally set logo if you've customized that image. You might just need to re-set that option. If things are breaking as part of that migration then something has gone wrong.

@ssddanbrown commented on GitHub (May 2, 2021): @Redsandro It should not break anything apart from maybe the globally set logo if you've customized that image. You might just need to re-set that option. If things are breaking as part of that migration then something has gone wrong.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2232