I believe this is related to another problem, but not sure about how to go about checking what that problem is exactly.

As you can see below in the screenshot, I have created an effect to scale and crop to 200 by 235. But what you'll notice in the example image is it is only scaled, and it squishes the image rather than cropping it to fit with proportion. Has anyone ever come across this before?

As a sidenote, the other problem I referred to is that when I go to edit a node with an image field, I click upload of an image and the actual image doesn't appear but a link to it in the defaul/files folder does. I know they're related but not sure what next steps might be.

Thank you - MattScreenshot


After testing a few items out, I also found out that any style changes to images no longer work. For example, I upload a image and it does show up in the default/files folder. But it doesn't generate any of the styles that I try out for it. For example, one style is "generated" with this url: http://www.egyptianstudysociety.com/sites/default/files/styles/200-235_past_events/public/1270px-02_meidum_pyramid_0.jpg?itok=9Lx0wrCV

But when I go to that image through a browser I am given: Access denied You are not authorized to access this page.

And if I go through my FTP, I cannot see the file at all.


Going through the logs, here is an example the drupal error log:

Type    access denied
Date    Thursday, February 23, 2017 - 2:11pm
User    Anonymous (not verified)
Location    http://www.egyptianstudysociety.com/sites/default/files/styles/media_thumbnail/public/9313765823_ba4cc244e6_b.jpg
Referrer    http://www.egyptianstudysociety.com/node/125/edit?render=overlay
Message sites/default/files/styles/media_thumbnail/public/9313765823_ba4cc244e6_b.jpg
Severity    warning


I got things fixed by following a fix, I've added the following code to my settings.php file:

$conf['image_suppress_itok_output'] = TRUE;
$conf['image_allow_insecure_derivatives'] = TRUE;

I got it from here http://www.drupal.org/node/1934498#comment-11679983

So my question is, why is this necessary?

  • I am unable to replicate the stretching with an identical image effect on a vanilla Drupal 7 install: puu.sh/ugNgY.png -- You may want to check that gd or imagemagick is configured correctly. – abielefeldt Feb 23 '17 at 20:55
  • As for the display of the image field, is the field type "Image" and using the "Image" display format? -- puu.sh/ugNpl.png – abielefeldt Feb 23 '17 at 20:56
  • I've checked both and they appear to be as they should be configured. I've updated my question with additional information regarding the possible cause. – Matthew Feb 23 '17 at 21:03

Your Answer

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

Browse other questions tagged or ask your own question.