When image styles are aplied to images the modified images are not created and the image url returns a 404 error. I've been checking for solutions and none worked for me. I commented the Options +FollowSymLinks in the .htaccess (https://www.drupal.org/node/1170440), I changed the files folder permissions to 777, I changed the theme and back... (image style (imagecache) images are not being created), and still nothing.

The worst part is that it was working fine until yesterday (at least i found it yesterday) and many of the pictures have their modified versions working, but not the new ones for which the url returns de 404.

Is there any thing I can do that I've not tried yet?

Thank you

  • try to submit file-system form and see if tmp directory has proper permissions Oct 29, 2015 at 9:57

3 Answers 3


I don't know what caused the issue but at the end I solved It following this steps:


1- Adding to the Nginx():

location @rewrite {
  # Some modules enforce no slash (/) at the end of the URL
  # Else this rewrite block wouldn't be needed (GlobalRedirect)
  rewrite ^ /index.php;

location ~ ^/sites/.*/files/styles/ {
  try_files $uri @rewrite;

2- Adding to the settings.php:

$conf['image_allow_insecure_derivatives'] = TRUE;

3- Rebooting the server.

This solution may bypass the error since, for what I know, nothing in the server configuration was changed when the problem started so this shouldn't be the root of the problem.


This could still be a permission problem. You need to make sure webserver can write to the image style folder. You need to use something like ls -al to check the permissions and the ownership of that folder. You may have to change the ownership of that folder so web server can view and write to it. Add another image, clear your cache.

  • the ownership and the permissions for the sites/default/files and its content are already checked, It shouldn't be the problem. Oct 29, 2015 at 11:37

Have you checked if the modified file ACTUALLY does exist? Modified files (the files where the style has been applied) should be stored in the public directory, usually inside the folder file/style/[name of style]/public/field/image. Go to www.yoursite.com/admin/config/media/file-system to find out the path public the public directory. The path is different if the pictures are uploaded by your users, in which case the exact path can be found at www.yoursite.com/admin/config/people/accounts, scroll down to Picture directory.

I would check if the files are actually being created and stored in the first place, by going to the folders where they should be stored.

  • Yes, they were not created. It's one of the first things I checked. Oct 30, 2015 at 8:53

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.