Image picker broken after uploading image with large resolution #2099

Open
opened 2026-02-05 02:54:07 +03:00 by OVERLORD · 5 comments
Owner

Originally created by @antontkv on GitHub (Feb 15, 2021).

Describe the bug
After uploading image with high resolution, 10425x8499 in my case. There is 500 error after upload and image picker breaks. It always shows loading animation. I can fix that by deleting uploaded image from uploads/images/gallery. My guess that bookstack can't create thumbnail of the image, because there is no new image in thumbs-150-150 directory.

Steps To Reproduce
Steps to reproduce the behavior:

  1. Go to Editing the page
  2. Click on Insert an Image
  3. Upload big image
  4. See error

Screenshots
image
image

Your Configuration (please complete the following information):

  • Exact BookStack Version (Found in settings): v0.31.4
  • PHP Version: 7.4
  • Hosting Method (Nginx/Apache/Docker): Bookstack and Apache inside Docker container, reverse proxy with Nginx on the host.

Additional context
I attach image that can help reproduce this issue.
bigimage

Originally created by @antontkv on GitHub (Feb 15, 2021). **Describe the bug** After uploading image with high resolution, 10425x8499 in my case. There is 500 error after upload and image picker breaks. It always shows loading animation. I can fix that by deleting uploaded image from `uploads/images/gallery`. My guess that bookstack can't create thumbnail of the image, because there is no new image in `thumbs-150-150` directory. **Steps To Reproduce** Steps to reproduce the behavior: 1. Go to Editing the page 2. Click on Insert an Image 3. Upload big image 4. See error **Screenshots** ![image](https://user-images.githubusercontent.com/17809291/107910143-9405ca00-6f7b-11eb-9a81-3bc42e4553ec.png) ![image](https://user-images.githubusercontent.com/17809291/107910156-9ec05f00-6f7b-11eb-8659-1122ac9c81b9.png) **Your Configuration (please complete the following information):** - Exact BookStack Version (Found in settings): v0.31.4 - PHP Version: 7.4 - Hosting Method (Nginx/Apache/Docker): Bookstack and Apache inside Docker container, reverse proxy with Nginx on the host. **Additional context** I attach image that can help reproduce this issue. [bigimage](https://user-images.githubusercontent.com/17809291/107910511-5fded900-6f7c-11eb-98fa-5b90983baf1c.png)
Author
Owner

@hwcltjn commented on GitHub (Feb 18, 2021):

I tested this on the demo, gave me a 502

@hwcltjn commented on GitHub (Feb 18, 2021): I tested this on the demo, gave me a 502
Author
Owner

@critchtionary commented on GitHub (Mar 23, 2021):

I get the same issue on Bookstack 0.29.3 with a 7047x4888 image.

@critchtionary commented on GitHub (Mar 23, 2021): I get the same issue on Bookstack 0.29.3 with a 7047x4888 image.
Author
Owner

@ssddanbrown commented on GitHub (Mar 24, 2021):

Just been testing this. This will be due to thumbnail system needing a lot of resources to process the image. If you max the system resources your php process will be killed and you'll get an error.

It'll generally be due to memory availability. This is where a bit of swap space can help if possible in your environment.

@ssddanbrown commented on GitHub (Mar 24, 2021): Just been testing this. This will be due to thumbnail system needing a lot of resources to process the image. If you max the system resources your php process will be killed and you'll get an error. It'll generally be due to memory availability. This is where a bit of swap space can help if possible in your environment.
Author
Owner

@Adrian-at-CrimsonAzure commented on GitHub (Aug 4, 2021):

I'm also having this issue with a 32MB map I'm trying to upload which is admittedly absolutely massive.

@Adrian-at-CrimsonAzure commented on GitHub (Aug 4, 2021): I'm also having this issue with a 32MB map I'm trying to upload which is admittedly absolutely massive.
Author
Owner

@S1lander commented on GitHub (May 8, 2025):

Are there any good solutions to this?
Edit: In my case I was able to fix this by setting the "memory_limit" of the PHP Settings in the plesk admin panel to 256M.

@S1lander commented on GitHub (May 8, 2025): Are there any good solutions to this? Edit: In my case I was able to fix this by setting the "memory_limit" of the PHP Settings in the plesk admin panel to 256M.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2099