I am using Drupal 8, and have just moved my site to shared hosting. When I upload a standard image field on my shared hosting environment, the thumbnail image does not show up. This works perfectly on my local (WAMP) development environment.

The full sized image is in sites/default/files/2017-02/redstart.jpg and is displayed correctly.

The thumbnail address is /sites/default/files/styles/thumbnail/public/2017-02/redstart.jpg and does not display (I assume it cannot create it).

I have checked all file permissions on the server, but cannot see anything wrong (directories are 0755, files 0644) Any ideas anyone? Is there another setting somewhere that I need to update?

  • Do you have the correct folder owner? – No Sssweat Feb 20 '17 at 13:46
  • Just to be sure this is not a permission issue, set 775 for sites/default/files and it subdirectories and give it another try. This will cover No Sssweat's question aswell. – OPTASY Feb 20 '17 at 13:51
  • 1
    did you upload the .htaccess files and set up mod rewrite or whatever else is necessary to properly redirect non-existing files to Drupal? Do your urls contain index.php? – Berdir Feb 20 '17 at 19:32
  • 1
    not tried that yet, after further experimentation it looks like any .JPG file works, i.e. I can see the thumbnail, but .jpg (lower case) does not work. Is this possible? Tghe same image file works if I change it from .jpg to .JPG. Also the .JPG is marked as text/x-generic rather than image/x-generic. What does that mean? – mike421 Feb 20 '17 at 20:54
  • 1
    To test this further I created a new content type with just one image field, using all the defaults. If I add an image of type "jpg", the thumbnail does not get copied to the "styles" sub directory and the thumbnail does not show. If I add an image of type "JPG" all works fine. Is this a bug in Drupal, or my hosting environment? – mike421 Feb 21 '17 at 12:23

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.