0

I have a new view that is coming up with a new issue, there is a "main image" for every entry, and for some reason after loading the page, almost all images break. But what's odd is that when you click on the Title Number or the Image (whichever you want to get to the content), the images in the format of "Original Image" loads almost automatically.

My link is below, let me know if it is something I am not doing right (and can't seem to see it at all)

http://cocemproject.org/pueblo/survey-register

Thanks!

-----------UPDATE---------------

If I stylize the main image as "Original Image", the image shows - but when it is stylized to my new Image Style "125x125" (which is 125px by 125px Scaled & Cropped), it breaks.

-----------UPDATE---------------

I tried a different Image Style that I know works elsewhere on the site, and it doesn't work here. Also, tried the format "Colorbox" just out of curiosity, and it makes the image field image disappear completely, not even a broken picture.

-----------UPDATE---------------

I also right-clicked the broken image and clicked "View Image", it leads me to http://cocemproject.org/pueblo/sites/default/files/styles/125x125/public/DSC_0131_1.jpg?itok=kGUeABuy but there is nothing there.

-----------UPDATE---------------

Now, I have gotten around to looking into my files and it appears that the Styles were never generated for these images.

-----------UPDATE---------------

Saw https://www.drupal.org/node/1109312#comment-10021707 and that clean URLs might be causing this, disabled the module, ran cron, cleared caches. Still no change.

-----------UPDATE---------------

Below are the folders with the permissions. I tried altering them and then flushing caches and running crons (just to hit everything).

Folders with Permissions Under Styles Folder Style Folder with Permissions

-----------------UPDATE------------------------

Turns out that these photos are too large for this site, and Drupal's just giving up on applying the styles to them. What's odd is that this site is technically a complete copy of an old one, just better planned out to incorporate recent changes on the old version. However, I used the exact same styles with the exact same pictures and had no problems. I'm still on the same server, just a different folder. What might be causing this?

  • Try to flush your image style using drush image-flush style_name – Suresh R Apr 7 '16 at 4:55
  • looks like it is a folder permission issue. Drupal is not able to create these 125x125 images because your image folder does not have a write permission. – No Sssweat Apr 7 '16 at 4:56
  • I have updated my question with screenshots of my styles folder and files folder to show the permissions. As far as I can tell (and by going through my other working sites) these are the correct permissions. Should I still go ahead with the drush image-flush style_name? – Matthew Apr 7 '16 at 15:17
  • @Matthew is your server running on Ubuntu? – No Sssweat Apr 8 '16 at 0:21
  • @NoSssweat no it is running on Apache. – Matthew Apr 8 '16 at 1:37
1

This should be a folder permission issue. What you need to do is check the image style folder (sites/all/default/files/styles) if it is writable. You can use ls command to check the directory permission. To change the permission you either need chmod or chown commands to make the folders writable by Drupal.

Once the permission are correct you may need to flush the cache for images. If you have Drush you can do that by running drush image-flush STYLE_NAME or by clearing them all by running drush image-flush all.

  • I have updated my question with screenshots of my styles folder and files folder to show the permissions. As far as I can tell (and by going through my other working sites) these are the correct permissions. Should I still go ahead with the drush image-flush style_name? – Matthew Apr 7 '16 at 15:18
  • Since you mentioned that you are using Apache, which is normally the default user is www-data, check if the directories are owned by www-data. If not then most probably the Drupal will not able to generate a new image in those folders. Here is the best thread I found about Apache permission askubuntu.com/questions/58725/… – Gulok Apr 16 '16 at 2:29

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.