Developer forum

Forum » Feature requests » Image Patterns enhancements

Image Patterns enhancements

Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi,

 

Working with many thousands of products we found that image patterns are lacking a few options. Here's what we need (and use in our current implementations, though the UI only partly supports is):

  • Custom fields - {ProductCustomFieldX}
    The ability to use product fields for image patterns
     
  • Fall-back options - {ProductCustomFieldX || ProductNumber}
    Pick a product custom field for the file naming pattern and if empty pick another field
    This is important when we have products where images are shared by multiple products, changing only small technical specs
    Think of "bolts" or "bearings". The image might be the same for multiple products and/or variants.
     
  • Variant Property field - {VariantOptionPropertyY}
    We use this to set a string on the variant options that would have a reference to a filename
    i.e. Red T-shirt in Sizes S, M and L where
    • T-shirt's custom field value for images = "TSHIRT00GRKR"
    • Red's variant option property is called "RJO" (company code for Red)
    • Sizes variant options have no property for image files
    • Pattern would be {ProductCustomFieldX || ProductNumber}{VariantOptionPropertyY}.jpg
    • Would return the same file for all red t-shirts
       
  • Use wildcards for multiple images
    Currently we can set multiple image patterns, but images needs to be named accurately. Some customers have a looser association where in code we do something like
    {ProductCustomFieldX || ProductNumber}{VariantOptionPropertyY}_*
    Thus getting all files that match the pattern (excluding non-image files)
    Sometimes the images might be named *_front, *_back, and other times *_1, *_2 - it just works
     
  • Extensionless patterns
    Set the ability to find image files, not explicitly jpg
    Since the image handler processes the output to be consistent, the input becomes less important

 

We have found this to be important dealing with 20k products with multiple images per product. When the filename association is set on the product number the UI looks beautiful, but real life scenarios. We need to make the image association more automatic (implicit), rather than manual (explicit) or force the user to render the frontend to ensure the images are properly associated.

 

Best Regards,

Nuno Aguiar

 


Replies

 
Jakob Westhausen
Reply

We could really also use these enhancements!

/Jakob

 
Nicolai Pedersen
Reply

Yes, it would be nice. Problem is that all of these things adds to making the image patterns even slower.

The problem is how the work - using wildcards would require a GetFiles() that would search potentially thousands of images - and you need to do it maybe 3 times for each product in a product list of 30+ products...

We are lookin into the possibilities though - adding new features in 9.5 with image groups etc. (primarily for PIM though).

BR Nicolai