I use Organic Groups, alongside IMCE and CKEditor.

In one content type, I have a text-field that the client will use to add some text and an image. Lets call this content type "Team Match Analysis" -> which is a group content type for the group type of "Teams." Thus, we have a team named Arsenal, with a page of their most recent match analysis.

However whenever I try to add an image via the CKEditor from the OG content type (Team Match Analysis), the image is uploaded correctly (but to the users' private area) and then a blank box is shown on the preview.

If I try going to the link it provides (direct link), then it is always a 404 NOT FOUND page error.

I don't know why it's not working, the private Drupal files are in another folder away from /var/www/ and I have chmod set to 775 for the private_drupal folder.

I know the private files work fine, since I have a File field for uploading PDFs which is set as "private files" but that uses the Multi-upload widget and not CKEditor to upload. That works fine, as the PDF files can only be accessed for people that are in the group.

Ideally what I need is to either set the image uploader/browser for CKEditor to use the "public profile" or find a way so that all the images that are uploaded are shared with the people in the same group and ensure that they can be displayed as an inline image with the tag for the multi-line text field.

UPDATE: 26/06/13

I can upload images (using CKEditor) but I can't preview or view them directly. It seems that CKEditor always uses the "private" profile which I've just set to be /private directory (and /public for public directory). All uploaded images are shown as "Not Found" when you try to go to the link, so it's something to do with Drupal not understanding that it needs to load/map the private files directory?

Strange since the "File" fields for PDF work fine.

UPDATE: 28/06/13

I assume it must be something to do with the database not being correctly updated when the image is uploaded in the IMCE widget (which is a pop-up when you click on the Add Image icon in the WYSIWYG - CKEditor toolbar for the text area field).

I have the images uploaded to "system/files/groups/group name/". If I browse to that directory, I get the Access Denied page from Drupal. However if I go to the direct link for the image which would be: "system/files/groups/group name/image.png" - then I get the "404 Not Found" page (which I assume is from the fast_404 module I have installed).

UPDATE: 1/7/13

Here's a list of all the modules: http://pastebin.com/vt2g1aPB

My private folder is: /var/private_drupal

My IMCE profile is set to the default one, with rules to see /main as well as /groups/ - those folders were created correctly and I get the Access Denied if I try to view the directory at: /system/files/groups/ - if I try an invalid group name (i.e. something that doesn't exist) then it gives me the page not found error which is Drupal Themed suggesting it's not provided by the fast 404 module.

I have just tried to upload images to where I would normally upload PDF files and all images show up as the 404 Not Found page (blank, no Drupal Theme), however all the .pdf files work fine still. For my "PDF" field (which accepts images, pdf, docs, etc.) these files get uploaded directly to the private directory and not in any sub-folder. However since none of the images work there it seems to be something wrong with the image/media modules for image files?

I decided to use the WYSIWYG Image uploader button to upload a PDF file, obviously I won't be able to see anything but going to the direct link of the pdf file results in an Access Denied page by Drupal... which is strange since I am in the group and should have access to view that PDF file.

It seems even worse now, the JSON Feeds parser which was working fine and would import the images from the URL for the feed items but no longer works... I've tried removing all image related modules and starting again but no luck, and still no errors in the database log.

EDIT: Fixed the JSON Feeds parser, it now imports the images fine again and uses the Large image style (overridden), all those images are uploaded to the public folder.

I'm wondering if I can maybe "force" WYSIWYG to use the public folder instead of private but to not break the file fields that I use for PDF that need to be private?

2 Answers 2


If you are using Image Styles, you might be having a problem with core 7.20. To test this, try setting the variable image_allow_insecure_derivatives to true, either with Drush or settings.php.

  • I've added $conf['image_allow_insecure_derivatives'] = TRUE to the settings file and cleared the cache, then tried to re-upload a new image using the IMCE browser via WYSIWYG (w/ CKEditor) and it still doesn't work, same 404 page.
    – dan2k3k4
    Commented Jun 30, 2013 at 20:49
  • Have you checked your logs?
    – Gaelan
    Commented Jul 1, 2013 at 0:27
  • With the "database logging" module on, I didn't notice any errors in the logs, and going directly to the image link then refreshing a few times, then checking the log doesn't add anything into the logs.
    – dan2k3k4
    Commented Jul 1, 2013 at 7:25

So I've decided to set the default download method to Public (it was Private), and now I can insert images just fine.

...and the PDFs still seem to be set to use the Private directory so that's not broken either.

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.