I have a functioning D8 site that has recently started displaying odd behaviour. Image styles are no longer generating correctly.

The sample.png used in the image styles config page generates fine (including if I delete the file manually from the image styles dir).

I have recursively set 0775 (dirs) and 0664 (files) to the entire sites/default/files directory, but the error persists. Error log just shows "access denied" - nothing more informative.

Drupal version is 8.1.9.

Any ideas? The site looks pretty lame right now!

  • I would also check owner and group for sites/default/files. – ya.teck Nov 4 '16 at 14:21
  • Just checked - all owned by the main web-server user / FTP user. This includes all subfolders and files in /sites/default/files/styles/... – almcnicoll Nov 8 '16 at 13:47

I have had issues in the past where derivatives weren't generating correctly intermittently and it was due to disc space running out. When logs were purged the image derivatives would generate, but otherwise, the server was running out of space. So that's one idea.

| improve this answer | |
  • Thanks for suggestion - hope it helps others. Sadly, we have plenty of space and it's still failing. – almcnicoll Nov 8 '16 at 13:29

I have at last worked out what is causing the issue - but not why it suddenly started happening.

Going through our hosting cPanel, I stumbled across xVarnish, which is enabled across the board. Disabling it on our website immediately made the image styles generate correctly.

It may be that I can configure it to ignore image styles (thoughts welcome!) but for now, I have so much caching enabled Drupal-side that I think I can do without Varnish.

However, unless someone has suddenly turned on Varnish without consulting me (unlikely, but hard to ascertain in my org) then I'm totally at sea as to why it suddenly started being a problem.

| improve this answer | |

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.