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
  • OK thanks. I am logged in as admin, so should be OK with 755. I tried changing to 775, and it worked for the next one I added. However, when I deleted the "redstart" and tried to re-add it, same issue, the thumbnail is missing. So I tried some more. So far 2 successful thumbnails, three failures. I am confused. – mike421 Feb 20 '17 at 14:33
  • "Logged in as admin" - you mean logged in in Drupal? That doesn't make a difference. File system permissions do not care about Drupal users and roles. Make sure that your system allows the web server user (often www-data, http or apache) to write in the public files directory. Do this recursively, for all files and folders under the public files directory. – marcvangend Feb 20 '17 at 14:44
  • OK, not sure I have any control here. The apache/php web site is with a shared provider via cpanel. I only have one log in id to cpanel, and can only see one set of permissions on the directories. Should I check this with the provider? – mike421 Feb 20 '17 at 15:01

@mike421 Thank you so much!!! For about a week now a project has been on hold because I could not figure out why thumbnails would not generate for each image. I tried almost everything from .htaccess changes, settings file changes, file permissions... Where mine was weird was the initial file would always work properly, but after that first upload where Drupal created the folders itself, no other thumbnails or custom image files would generate despite the fact that the main file uploaded successfully and all the permissions were the same. The uppercase extension was the key!

What is odd is that within the file types allowed, its actually the lower case extension names listed. But every file I've tried with an uppercase extension seems to work as it should, even if the photo is several MBs large.

Going to start a new thread to ask about this because there has to be some kind of rhyme or reason why capitalizing the file extension is the difference between pass and fail for at least two people.

| improve this answer | |
  • How does this ANSWER the QUESTION? – Pierre.Vriens Mar 28 '17 at 14:18
  • It was the only means available to me I was able to find to comment on his answer and let others who may have spent the DAYS worth of time as I have trying to figure this out know that this is a viable option that just might help them, and add a little of what I stumbled upon in my own experiences. That or wait for my reputation to hit 50. I chose to do what I was able to do. – jcm Mar 28 '17 at 16:55
  • The typical "reputation" issue (not enough rep to post a comment). If you do want to "upgrade" to rep of at least 50, then have a look at ALL these questions ... there are over 1500 of them, most of them could be edited by at least removing "Drupal 7" from their title. So just suggest an edit for 25 of these questions, where you remove that from the title, and with a suggestion comment like "remove tag from title" ... 25 edits X 2 points each is ... 50 points ... And guess what would happen if you do 250 of such edits? – Pierre.Vriens Mar 28 '17 at 17:07
  • Thanks jcm, I have two Drupal sites, one D7, one D8, and the "small jpg" fails on both, the "capital JPG" works. I tried to ask the question here as well, but got no response. I still think there is a fault with Drupal to do with UNIX being case sensitive. Hence why it works on WAMP, but not on my shared hosting. – mike421 Mar 29 '17 at 15:10
  • drupal.org/node/2854888 – mike421 Mar 29 '17 at 15:30

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.