Hi!

I am using Imagecache, the CCK Imagefield and Views.

The upload of an image works well, but after creating a view with a thumbnail created by Imagecache there is a problem.

The image and thumbnail can be find at "sites/default/files/image.jpg" and "sites/default/files/image.jpg.thumb.jpg". When I let Views show a list of nodes including the thumbnails, views is looking for the thumbnail at "sites/default/files/imagecache/thumb/image.jpg". So it can't be found and can't be shown.

I'm using the latest releases of the three modules.

Can anybody help me?

Thank you!

Comments

Apfel007’s picture

I've the same problem!

2c’s picture

Me three! On my installation I notice that ImageApi is throwing an error first so it might be the cause of the problem.

Note: I'm using imagecache 5.x-1.2

http://drupal.org/node/298564

jonrad’s picture

The image.jpg.thumb.jpg file is created by the imagefield module. That image is completely unrelated to your imagecache image.
The imagecache/thumb/image.jpg file is created by imagecache. The fact that you can't see the imagecache image is the actual issue.

dgurba’s picture

I have the same issue here where the imagecache/ images are not being created and I am getting an image.jpg.thumb.jpg from the imagefield module.

Is there any info I can provide that would be helpful? Folder/File permission screen dump? Module Version info? Anything?

I am using:
imagefield 6.x-3.0-alpha2
filefield 6.x-3.0-alpha4
ImageAPI 6.x-1.0-alpha2
with ImageMagick as my processor --
Version: ImageMagick 6.3.7 12/13/07 Q8 hxxp://www.imagemagick.org
Copyright: Copyright (C) 1999-2008 ImageMagick Studio LLC

ImageCache 6.x-1.0-alpha2

mrtoner’s picture

1. What is the location of your existing image?
2. What location are you using to view the ImageCache derivative?

dgurba’s picture

1. the imagefield module uploads the images to the default /files location -- no custom path is set.
2. Maybe I'm confused -- but when I upload the image file using the Image Widget the image gets upload to the /files directory but the thumb is created as: http://id.ucsb.edu/sites/default/files/panda.jpg.thumb.jpg. Once the Ajax remote call has uploaded the image and tries to show the thumb I get a broken image. When [I believe] since I have imagecache installed I believe it should be: /sites/default/imagecache/panda.thumb.jpg or similar.

Any advise is appreciated.

mrtoner’s picture

You are confused. :-)

The panda.jpg.thumb.jpg is -- as jonrad pointed out above -- created by ImageField. It's used at node/*/edit to show you what you uploaded.

With ImageCache installed, you first need to define a preset at Administer >> Site building >> Imagecache. For example, create a 'thumbnail' preset with a Scale action. With that preset, your thumbnail will be created at
[file system path]/imagecache/thumbnail[original image].

If your original image is at /sites/default/files/panda.jpg, then the thumbnail will be at

/sites/default/files/imagecache/thumbnail/panda.jpg

/sites/default/files -- your file system path

/imagecache/thumbnail -- this tells Imagecache to use the 'thumbnail' preset

/panda.jpg -- the original image

rotzloeffel’s picture

I think, dgurba_ucsb's problem is, that no folder and no image is created in "/sites/default/files/imagecache/".

And that's my problem, too.

mrtoner’s picture

Priority: Normal » Critical

I'll ask you the same questions, rotzloeffel, worded a little more specifically:

1. What is the path to your original image?
2. What is your ImageCache preset?

dgurba’s picture

I have an imagecache preset -- and the /imagecache directory is created. But if hit the imagecache/thumbnail/[FILENAME] dir I get:

127.0.0.1 - - [09/Sep/2008:13:32:03 -0700] "GET /sites/default/files/imagecache/thumbnail/panda.jpg HTTP/1.1" 404 -

I have noticed that my files directory is owned by me and my usergroup vs. imagecache directory which is owned by "_www wheel" usergroups ... is that normal?

dgurba’s picture

Ok -- so I named the preset "gallery" it has 3 actions: resize [500, 400], resize [800, 600] and scale [width: 1024, upscale No]

The following URL generated an image:
http://id.ucsb.edu/sites/default/files/imagecache/gallery/panda.jpg

Not really sure which Imagecache Action this is as the README states:

***********************************************************
Viewing Manipulated Images:

Your modified image can be viewed by visiting a URL in this format:

http://example.com/files/imagecache/preset-name/files/image-name.jpg

For example, if your preset is named 'product_thumbnail' and your image is
named 'green-widget.jpg', you could view your modified image at:

http://example.com/files/imagecache/product_thumbnail/files/green-widget...
***********************************************************

Should I not have 3 actions for that Namespace or what is the proper URL path to view the 3 distinct actions?

Lastly -- shouldn't ImageField return an imagecache thumbnail in place of its default panda.thumbnail.jpg file as I have ImageCache setup to do the image processing (I do NOT have GD installed at all).

Thank you for your time,

mrtoner’s picture

Priority: Critical » Normal

Should I not have 3 actions for that Namespace or what is the proper URL path to view the 3 distinct actions?

No. .../imagecache/gallery/... tells ImageCache to use your 'gallery' preset, along with all the actions defined for that preset. To use distinct actions on an image, create separate presets with only those actions.

Lastly -- shouldn't ImageField return an imagecache thumbnail in place of its default panda.thumbnail.jpg file as I have ImageCache setup to do the image processing

No. ImageField is not directly related to ImageCache and does not require ImageCache. Whether or not ImageCache is installed, ImageField creates a thumbnail according to its own specs that it can use for its own purposes.

dgurba’s picture

Priority: Critical » Normal

ok than you for the responses --

My 3 presets do not appear to be running -- I have only 1 generated file when I goto ../imagecache/gallery/panda.jpg

My last question is:

Is there any integration plans between ImageField and ImageCache [for D6] -- since ImageCache does not offer an HTML widget for invoking preset actions (though it does have a callable API and URL lookup). It would seem to that ImageCache has a relation to ImageField in that ImageField provides a widget to invoke ImageCache preset actions.

Here is the use-case I am considering:

A staff member uploads an image (via ImageField) to an image gallery. ImageCache performs its preset actions upon form submital.

Having ImageCache perform actions [solely] on URL dispatch from www.mysite.com/gallery-view page load has the following drawbacks:

1) degrades end-user experience with slow page load because of invoking preset actions
2) Does not utilize batch processing at all

Thank you for your responses -- I am merely pleading my case for seeking some integration between these two modules, I will follow up with ImageField maintainer(s).

mrtoner’s picture

My 3 presets do not appear to be running -- I have only 1 generated file when I goto ../imagecache/gallery/panda.jpg

You don't have three presets -- you only have one. Your 'gallery' preset performs three actions on your original image, giving you a single, modified image.

Is there any integration plans between ImageField and ImageCache [for D6]

I can't answer for the maintainer of either ImageField or ImageCache, but...

It would seem to that ImageCache has a relation to ImageField in that ImageField provides a widget to invoke ImageCache preset actions.

No, it doesn't. ImageCache, with its presets and its actions, is never invoked by ImageField or any other module. ImageCache only operates whenever the browser requests a URL with .../imagecache/[preset]/... embedded in it.

Having ImageCache perform actions [solely] on URL dispatch from www.mysite.com/gallery-view page load has the following drawbacks:

1) degrades end-user experience with slow page load because of invoking preset actions
2) Does not utilize batch processing at all

I disagree. #1 only occurs the first time the image is processed. Once the image has been processed, the derivative image is available without need for reprocessing the original image. To continue with the example above, /sites/default/files/imagecache/gallery/panda.jpg now exists and will be served by the web server without any need for passing the request to Drupal or ImageCache.

Re: #2, batch processing is not exactly what you're asking for. You're asking that ImageCache process the image immediately upon upload. Instead, ImageCache processes the image on demand and, in the case of your gallery, would actually -- in a way -- batch process all the images on the page that had not already been processed.

Although I'm saying "No" and "I disagree" a lot, I'm not attempting to be argumentative. I'm just trying to explain what ImageCache does do and what it doesn't do, and perhaps clear up any misunderstanding about how it works.

I understand what you want to do: upload an image and create several derivatives at the time of submission ImageCache doesn't do that. IMCE is an example of a module that does create multiple thumbnails, when the image is submitted. There's also an IMCE Image module that provides integration with CCK, just like ImageField. Perhaps there are other modules that offer similar features for derivative creation.

But, by all means, open a feature request issue for ImageCache/ImageField if another module doesn't meet your needs.

dgurba’s picture

Ok -- I see your valid points. I may well open a feature request please allow me to tinker abit over the weekend. Perhaps I can put on my thinking hat and attempt to get some of the integration down myself.

ingo86’s picture

I have the same problem. Imagecache does not create the folder that it links while showing a node.
Every time i upload an image, i can find two files into sites/default/files/ , one called image_name.jpg and the second called image_name.jpg.thumb.jpg . I use imagefield and i think that this module could not generate a thumbnail, so there seems something wrong inside imagecache. It seems (but i don't know if it's connected with the issue) that the path you set with imagefield remain the same for imagecache presets.
Waiting for news about this.
Ingo86

mrtoner’s picture

@ingo86: Please read my explanations above. ImageField is creating the image_name.jpg.thumb.jpg thumbnail. ImageField displays that thumbnail when the node/*/edit form is displayed. ImageCache does not create derivatives when you upload an image; it only creates derivatives when it is requested to do so.

What ImageCache presets have you defined? What are their names?

ingo86’s picture

I have defined three imagecache presets:
- Thumbnail
- NodeView
- FullSize

Imagecache doesn't generate any image. I have only a directory imagecache under files, which is always empty.

mrtoner’s picture

ImageCache will create the image for you when you give Drupal a URL like example.com/system/files/imagecache/Thumbnail/image_name.jpg. Unless a browser specifically requests a URL with .../imagecache/[preset]/... embedded in it, ImageCache will not create a derivative.

alexmoreno’s picture

could you explais this please? Im using drupal 6 with the latest versions on both modules, the preset created and indicated in the "display field" section but nothing happens when i upload a file. Even the preset-name directory is not created. It´s so frustrating :-(

ingo86’s picture

summit’s picture

Subscribing, greetings, Martijn

AgentD’s picture

I think I have a similar issue (images not appearing in node, or in a view), but I'm not following what the fix is. I'll try to detail out exactly how everything is set up.

I'm using:
Drupal 6.5
PHP 5.2.1
CCK 6.x-2.0-rc10
ImageAPI 6.x-1.0
ImageCache 6.x-1.0-alpha2
ImageField 6.x-3.0-alpha2
Views 6.x-2.0
"Sites" and "Files" folders are set to 755

I have a content type called "Boats". Within this content type I have an ImageField called "Picture". The configuration for "Picture" has "boats" as the "File Path".

I have two ImageCache presets, Node_View and Thumbnail. Views displays the "Thumbnail" on a page that lists out nodes of this content type, and I have the ImageField in CCK set to display Thumbnail in teaser, and Node_View on the full node.

When I create a piece of content the browser is looking for the picture (in the full node) here: /sites/default/files/imagecache/Node_View/boats/"imagename".jpg

When navigating to the View which lists nodes and should display the thumbnail, the browser is looking for the thumbnail here: /sites/default/files/imagecache/Thumbnail/boats/"imagename".jpg

Neither URL the browser is looking contains those files. They are both found here: /sites/default/files/imagecache/boats/

Note the URL where the files actually are does not include the preset name.

What am I doing wrong?

Thanks for any assistance.

Dan

yosemite’s picture

subscribing

--------------------------------------------

fixed my problem

increased memory to 96 megs and enabled ImageAPI GD2

drewish’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.