I have been working with CiviMail to upload images directly to the mailing templates from the KC finder image upload. I am successfully able to upload an image via KC finder which looks good when I upload it. However, once I click away to add the image to the template it shows a big red x instead of the actual image. I understand that it might be a permissions issues but I have tried different options for the issue and it does not work. This CiviCRM is on a Windows 2012 server with IIS 8.5 and PHP 5.6.20. I have tried a number of options from not naming the images with dashes to permissions of the server.

enter image description here enter image description here

2 Answers 2


If your images are being stored in a directory that prohibits direct access, it will give you that symptom. There's a .htaccess file that performs this function for apache, I'm not sure how that works with MS servers.

Your best bet is to try loading the image directly (e.g. right click on the broken image and load the image in a new tab) and see what the path/url is, and look in your server logs, it should tell you why that image is not being loaded, i.e. either whether it is a permission or just a not-found issue.

  • Hi Alan. Thanks for that. I am looking at the path and URL and they match. The only difference is the directory uses the C:// as the directory path and the image url upload uses the domain name. The image uploads successfully, I can see it in the KCfinder and also on the server. However, when I try to hit the URL it shows a not found. I understand it might be a permissions problem - just thinking what to do next. Dec 22, 2016 at 7:21
  • I did a bit more work and it seems like it is possibly a windows permission issue. However, it is not a simple read or write permissions issues and I am trying to work through it systematically. The system creates a new group and when you click on the group and edit its permission the images and files work. However, when a new image is uploaded it does not work again. Any ideas would be great. Dec 22, 2016 at 8:17
  • Windows permissions is out of my interest unfortunately. If it's anything like linux/unix permissions, you just need to figure out how to get uploaded images into your group automatically. Sounds like a security feature that would be a problem for any uploaded file/image for your site.
    – Alan Dixon
    Dec 23, 2016 at 18:48
  • Thanks Alan for your hep. It gave me some good ideas to work through the issue. I have resolved it. I will answer this question. Dec 24, 2016 at 0:50

The answer to this issue is in the PHP uploads which needs to match the directory upload url. When a file is uploaded via CiviCRM it goes to the temp folder (same like Drupal) and then moves the file to the permanent folder after it has been fully uploaded. If the temp folder and php temp folder do not match exactly then the image will appear broken on the screen. This video actually gave me the idea of a solution - https://www.youtube.com/watch?v=Wrr-dTFfNi8

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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