Images not uploading #664

Closed
opened 2026-02-04 21:44:17 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @vdavid on GitHub (May 4, 2018).

For Bug Reports

  • BookStack Version (Found in settings, Please don't put 'latest'): v0.21.0
  • PHP Version: 7.0.29
  • MySQL Version: Aurora MySQL 5.6.10a
  • Webserver: nginx
  • OS: Amazon Linux
Expected Behavior

Image uploads and appears in the list of images.

Current Behavior

Image file uploads to server, but it does not show up in the list. A reference to "null" is in the source.

Steps to Reproduce

Attempt to upload an image.
Problem in action: https://www.screencast.com/t/PhB3yechGKX (sorry for the Flash format)

Any Notes

This is a completely fresh install, the first thing I wanted to change was the company logo. After 3 hours of usage, all other BookStack features seem to be working flawlessly.

APP_URL is set to https://mysubdomain.domain.com.

Curiously, the physical file uploads properly and the link at the top-right of the "Image Select" dialog box points to https://mysubdomain.domain.com/uploads/images/system/2018-05-May/logo.png which is the correct address, and the image gets served correctly.
But on the Settings page I get <img src="null" class="logo-image" alt="Image Preview"> for the logo.

Also, I'm getting an "An error occurred uploading the image" error message when I try to copy-paste or drag&drop an image to any page.
Both public/uploads and storage/uploads folders are writable by the web server.
Laravel's debug console shows nothing noteworthy.

Originally created by @vdavid on GitHub (May 4, 2018). ### For Bug Reports * BookStack Version *(Found in settings, Please don't put 'latest')*: v0.21.0 * PHP Version: 7.0.29 * MySQL Version: Aurora MySQL 5.6.10a * Webserver: nginx * OS: Amazon Linux ##### Expected Behavior Image uploads and appears in the list of images. ##### Current Behavior Image file uploads to server, but it does not show up in the list. A reference to "null" is in the source. ##### Steps to Reproduce Attempt to upload an image. Problem in action: https://www.screencast.com/t/PhB3yechGKX (sorry for the Flash format) ##### Any Notes This is a completely fresh install, the first thing I wanted to change was the company logo. After 3 hours of usage, all other BookStack features seem to be working flawlessly. APP_URL is set to `https://mysubdomain.domain.com`. Curiously, the physical file uploads properly and the link at the top-right of the "Image Select" dialog box points to `https://mysubdomain.domain.com/uploads/images/system/2018-05-May/logo.png` which is the correct address, and the image gets served correctly. But on the Settings page I get `<img src="null" class="logo-image" alt="Image Preview">` for the logo. Also, I'm getting an "An error occurred uploading the image" error message when I try to copy-paste or drag&drop an image to any page. Both `public/uploads` and `storage/uploads` folders are writable by the web server. Laravel's debug console shows nothing noteworthy.
OVERLORD added the 🐕 Support label 2026-02-04 21:44:17 +03:00
Author
Owner

@Abijeet commented on GitHub (May 6, 2018):

Hi @vdavid,

Sorry to hear you are having problems.

I see that image thumbnails are not generated properly.

I would do two things,

  1. Ensure php-gd extension is installed.
  2. Run composer install again.
@Abijeet commented on GitHub (May 6, 2018): Hi @vdavid, Sorry to hear you are having problems. I see that image thumbnails are not generated properly. I would do two things, 1. Ensure php-gd extension is installed. 2. Run composer install again.
Author
Owner

@vdavid commented on GitHub (May 11, 2018):

I'll try both and come back with the results, thank you very much.

@vdavid commented on GitHub (May 11, 2018): I'll try both and come back with the results, thank you very much.
Author
Owner

@Radiergummi commented on GitHub (Jun 9, 2018):

As requested in #712: I'm facing these issues on all pages and with title images for books. The logo uploads fine, however. I've noticed some few images tend to be working, most do not. However, in a subsequent installation of the exact same VM image, uploading works flawlessly!
Might this somehow be related to the client browser/cache/service workers/local storage/whatever?
I'll check with a new browser and report back, however I think this issue should be investigated either way.

On a side note: Uploads will silently fail if the PHP upload limit is too low for a file. BookStack should issue a warning in that case, or just set Dropzone.js' maxFilesize option to the current php.ini value (ini_get('upload_max_filesize')).

@Radiergummi commented on GitHub (Jun 9, 2018): As requested in #712: I'm facing these issues on all pages and with title images for books. The logo uploads fine, however. I've noticed some few images tend to be working, most do not. However, in a subsequent installation of the exact same VM image, uploading works flawlessly! Might this somehow be related to the client browser/cache/service workers/local storage/whatever? I'll check with a new browser and report back, however I think this issue should be investigated either way. On a side note: Uploads will silently fail if the PHP upload limit is too low for a file. BookStack should issue a warning in that case, or just set [Dropzone.js' `maxFilesize` option](http://www.dropzonejs.com/#config-maxFilesize) to the current php.ini value (`ini_get('upload_max_filesize')`).
Author
Owner

@ssddanbrown commented on GitHub (Nov 23, 2021):

Since the last comment on this issue is relatively old I'm going to close this. If the issue remains and is something you still require to be fixed please open a new issue, referencing this one.

@ssddanbrown commented on GitHub (Nov 23, 2021): Since the last comment on this issue is relatively old I'm going to close this. If the issue remains and is something you still require to be fixed please open a new issue, referencing this one.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#664