Drupal 5.2
imagefield 5.x-1.1
cck-5.x-1.6-1
tmp = chmod 777
user_files = chmod 777
private file download method

When I upload an image, the thumbnail does not show until I have submitted and gone back in to edit the node.

Step one
After I have selected and clicked upload, a missing image icon appears instead of the image. It has the following path
http://www.mysite.co.uk/system/files/system/files/susana.jpg (at this point I can access the image only if I go to http://www.mysite.co.uk/system/files/susana.jpg )

Step two
After I click submit and view the node the image it is still not visible

Step three
Once I click edit, I can see the thumbnail. The path of the image is now
http://www.mysite.co.uk/system/files/susana.jpg

This is a problem because my users will be using these fields and they will be confused by thumbnails and images not appearing.

Thank you in advance for any help.

Comments

edhel’s picture

Category: support » bug
Status: Active » Needs review

How to fix: open imagefield.module file, find theme_imagefield_image function and change line 640:

$url = file_create_url($path);

to:

$url = url($path);

It works with both public and private method for me.

darren oh’s picture

Status: Needs review » Needs work

That solution will not work unless clean URLs are enabled or the download method is private.

edhel’s picture

This code works on my site with clean URLs & private method.

darren oh’s picture

My point was that the code will not work without clean URLs if the download method is public.

dnbsecrets’s picture

i have the same problem and didnt find any solutions yet

dnbsecrets’s picture

Priority: Normal » Minor

there seems a bug with gzip output compression & firefox.
when u output gzipped compressed binary data to firefox.
so that's actually not a bug of drupal or imagefield.
i have the same problems with imagecache also
that outputs also images with php.

dnbsecrets’s picture

Status: Needs work » Fixed

so i'm changing the status

dnbsecrets’s picture

oops, reposting

baja_tz’s picture

Status: Fixed » Active

Not fixed so changing status.
See http://drupal.org/node/155726#comment-635896

darren oh’s picture

Status: Active » Closed (duplicate)

Duplicate of issue 130701.