Developer forum

Forum » PIM » Extended logic in assigning the default image in image pattern

Extended logic in assigning the default image in image pattern

Barend Mosch
Reply

Hi there,

We have an auto assign assets to products task based on the productId which works fine. It listens to the following directory:

Where we rescale the same images to 400x400. Currently these images are being assigned to the products as wel as the normal image.
Is it possible to exclude this 400 directory when checking the default image?

The default image is checked with a postfix of '-1'.

Occasionaly it assigns the 400x400 image to default and not the normal (same files name since its generated from the normal)

Is anything we can do?

Thanks in advance,

Barend Mosch


Replies

 
Michael Knudsen
Reply

Hello Barend,

- if you where using the image pattern on the PIM warehouse, you will have an option to deselect "Search in subfolders", but when you are using the "Digital assets checkin on products" scheduled job, you don't have the same option.

 

Br. Michael Knudsen

 
Barend Mosch
Reply

Hi Michael,

Thanks!

I do want the 400x400 subfolder to be assigned to the products. But the folder needs to be excluded when checking the default image.
Disabling 'Search in subfolders' results in not assigning the 400x400 images which is not wanted.

Sounds like it's going to be a feature request.

Kind regards,

Barend Mosch

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply
This post has been marked as an answer

You can change the folder structure so the 2 folders are on the same level instead of under each other.

/products/400
/products/default

Another thing - it is not needed to upload product images in different sizes like this as GetImage can resize the images when needed.

Votes for this answer: 1

 

You must be logged in to post in the forum