I'm using imagecache, imagefield and ubercart for attaching images to products.

I've created a preset called product to resize images.

When I attach the first image, it works like a charm.

When I attach a second image, however, the image is not resized.

Comments

stanb’s picture

The image modules are truly awesome, unfortunately, I am experiencing exactly the same problem.

ubercart-5.x-1.7
imageapi-5.x-1.4
imagecache-5.x-2.3
imagefield-5.x-2.3

I have tried deleting and reconfiguring the imagecache product preset to no avail.
I've tried flushing the cache and running cron manually.
I've tried adding a new action for the product preset with the same scale settings as the first...no luck.

I'm sort of stumped at this point. Seems like it should work out of the box.

drewish’s picture

Status: Active » Postponed (maintainer needs more info)

is it just that image or does it happen with other images? my first guess would be that your image is large and causing php to run out of memory.

stanb’s picture

Thank you for the response. The images that I'm uploading are small (370 pixels x 370 pixels) and < 40KB but I don't think this is the issue. The issue results from my imagecache settings, I think.

My imagecache settings are:
Scale for preset cart is 100 pixels for width, none for height
Scale for preset product is 200 pixels for width, none for height
Scale for preset product_list is 100 pixels for width, none for height
Scale for preset uc_category is 100 pixels for width, none for height
Scale for preset uc_thumbnail is 100 pixels for width, none for height

The problem is that when the settings are as described, the first product image appears as 200px and the additional product images appear as 100px. So the uc_thumbnail setting is being used to size the additional product images. I managed to change this by setting uc_thumbnail to 200 pixels but then the product page looks rather odd with all the images at 200px especially if you have many images for a given product.

So, using the uc_thumbnail setting for the additional images makes sense especially if you have lots of images per product. It just looks strange if you have 2 images per product. Then one image is larger than the other. Without some sort of override that can be applied per product, I guess there is nothing one can do unless there is a layout that can be assigned to a product type but I haven't looked into this. Maybe the Drupal Contemplate module would work for this?

Anyway, I believe Ubercart was designed to work this way and I'm not sure there is any better way to implement the product page other than allowing complete customization of each product page with a template on a per node basis or being able to define product types, each with its own unique layout.

drewish’s picture

Category: bug » support

okay this seems pretty different from your initial issue posting. my understanding is that you've got multiple images attached to a node and you want the first one to use preset A and the subsequent ones to use preset B. is that correct? if so it's doable but outside the scope of the imagecache module. you'd need to write your own field formatter.

fizk’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)