Following on from many many months of difficulties with KCFinder being incredibly slow, and other posts, we now have a situation where KCFinder 'sometimes' refuses to upload images.

We haven't yet found a pattern as to when it does and doesn't upload images. We can always upload the images directly to the folder by ftp.

We have over 1,000 pictures in the folder, so it's quite likely that's the cause! :-(

But how can we gain control of the situation? It's hard to simply delete images since they may have been used in recent emails.

I've tried looking in /var/log/apache2/error_log, the Civicrm log and Drupal log, and none show any issues. We're using Drupal latest and Civicrm 5.24.4. Thanks for any help you can give us!

  • Can you confirm if this is a problem in both Chrome and FF? There is a known bug with file upload/delete in drupal with latest chrome. no idea if related but you may as well check
    – petednz - fuzion
    Jun 2 '20 at 21:12

Sounds like a combination of a slow-ish server/network, too many images and possibly some configuration bits.

The KCfinder runs in a little popup window that makes it extra difficult to diagnose, and tries to load thumbnails of all your existing images so you can select one. All that work is overloading both your network and your server (and maybe even your browser, though unlikely).

You may be able to customize kcfinder so that it's not generating quite so many thumbnails, and/or fix your server so that it doesn't have to do it each time (i.e. with some caching, though that's a bit tricky, e.g. ensure you have mod_expires enabled with apache).

You're right that you're somewhat painted into a corner, and a more powerful server might be the easiest solution.

Alternatively, you could set up a separate directory for old images and move over ones that are more than a month old.

Going forward, you may also want to make sure you're not uploading really large images, i.e. scale them on your own machine before uploading them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.