Search code examples
drupaldrupal-7

Drupal doesn't generate thumbnails


I don't know why Drupal stopped generating thumbnails. So, I get error on files like this:

/sites/default/files/styles/choices/public/a1531172504.jpg?itok=Wn-VWDKd

Although the full image is found in:

/sites/default/files/a1531172504.jpg

I'm working on Nginx, Drupal 7


Solution

  • Last time I've answers question related to image derivatives I've got minuses so let be thorough here.

    1.Drupal core will NOT create image derivative upon image upload - fact.

    2.Thumbnail image (derivative from original image) is physically created upon HTTP request eg. if you visit the listing where image is used (when you visit the listing with thumbnail image the derivative is created on the fly via HTTP request)

    3.To alter this behavior and to get a derivative image instantly upon image upload via CCK field you must use module Imageinfo Cache https://www.drupal.org/project/imageinfo_cache

    With this info form above please recheck your site (go to listing where the thumbnail should appear and than check your thumbnail folder) If the image is still missing please provide more details like: Are you using CCK field or is it a custom field, are you creating derivative programmatically? Some code snippets are required here to solve you problem.

    Also please check your .htaccess located in sites/default/files/.htaccess (not the general .htaccess) and while you there check the permissions on files folder.