I am using Drupal 7.0, I created a content type with a simple image field.
Also set a default image for the field. Now,

  • It shows the default image even if I upload an image while adding the content.
  • After adding some contents, I edited the field and removed the default image. Then the original images shows up.
  • When I uploaded a default image again, Its always showing the default image on all locations
    • thanks!


Eirikrs’s picture

I have experienced a similar problem using Drupal 7.0. Content type with imagefield, when uploading image the correct thumbnail shows in the upload area, but not in the imagearea itself. And in any views using this field the default image is displayed.
Also I'm unable to remove any image, including the default, pressing "Remove" gives no response, the blue circle spins for å while, then stops spinning and nothing more happens.
This is happening in my test setup, not published online. I have tried alternating between public and private upload, but with no success.

illogicz’s picture

I have the same problem.

A views block shows the image fine, but when I visit the actual node, the image in the node and now the view image (only for that node) in the view shows the default image.

illogicz’s picture

I found a fix for my setup.
In file image.field.inc, function image_field_prepare_view, line 190. Changed

-    if (empty($items[$id]) && $field['settings']['default_image']) {


+    if (empty($entities[$id]->{$field['field_name']}) && $field['settings']['default_image']) {

I my case, image_field_prepare_view gets called 3 times for a field, the first two times $items[$id] comes up as empty (when there is an image), so I checked using $entities[$id] instead. No idea why this happens or if this fix has any other repercussions.

Again, this only happens when I visit the actual node the image field belongs to.

diedlikeahero’s picture

I was unable to reproduce this in 7.10. I would say that this was fixed in some time between 7.0 and 7.10.

diedlikeahero’s picture

Status: Active » Closed (cannot reproduce)