Design and CSS styles
Version 6.x > Design and CSS styles > Product Images - In Media Library or Not (What's recommended)? View modes: 
User avatar
Member
Member
ewiley@usfi.com - 2/28/2012 4:31:07 PM
   
Product Images - In Media Library or Not (What's recommended)?
Hello-

When adding a product we see the ability to add an image. When browsing for a file to upload, there isn't really an option to select an image from a media gallery. Is there something I'm missing?

I know that the import/export tool can absorb many products at a time. Can it also absorb their images (along with multiple images for the same product -- example: standard product images, and a thumbnail)?

Eventually, I'll want to import many products at a time (250+). Many of those will have more than one product image. What is the best method to do this, assuming that the products already have images?

Thanks,
Eric.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 3/2/2012 3:24:30 AM
   
RE:Product Images - In Media Library or Not (What's recommended)?
Hi,

You can change the SKUImage field by using this web.config file key:

<add key="CMSUseMetaFileForProductImage" value="false"/>

I would recommend to use document attachments which will be attached to the document which is connected to the product/SKU (adding new products).

And when importing, we have a sample KB article but you will need to modify the code to fit your needs and also use the API for handling attachments.

Best regards,
Juraj Ondrus

User avatar
Member
Member
ewiley@usfi.com - 3/2/2012 11:32:00 AM
   
RE:Product Images - In Media Library or Not (What's recommended)?
Thanks for the advice.

If possible, can you go into slightly more detail about what the web.config value you refer to will do when set to false?

Right now our products will have one 'main' image, and then several other images in the form of attachments. What will adding the key you suggest about do?

Thanks,
Eric.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 3/4/2012 8:26:15 AM
   
RE:Product Images - In Media Library or Not (What's recommended)?
Hi,

You can just try it :-) and it will actually do what you asked in your first post - the modal dialog will be changes and it will let you know to select an image e.g. from Media library, content or add URL address to the image.

Best regards,
Juraj Ondrus

User avatar
Member
Member
ProxyCG - 4/27/2012 1:15:22 PM
   
RE:Product Images - In Media Library or Not (What's recommended)?
Hi Juraj,

I have question on the recommended approach of document attachments.
1). Are the files stored in the database or the files system?
2). For seo purposes and url readability its nice to have an image in the file system named kentico-cms.jpg v.s. a long string that means nothing. How can this be achieved again looking at the document attachment approach?
3). Can it be put in a heiarchy? Meaning images, images-software, images-hardware, images-apples etc.

I tried the file settings in the configuration but when examining the file system I saw that they were put in their own directories with no meaning to the casual reader - again for seo purposes and readability - it would be nice if this approach could be achieved with what I have stated above.

Also, in the media library is it possible to define custom paths for product images on a per site basis? So site1 may have root/images/usa, root/images/greece etc. and site2 may have root/productimages/producttype1, root/productimages/producttype2 etc.


Any other suggestions or possibilities?

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 4/27/2012 6:23:38 PM
   
RE:Product Images - In Media Library or Not (What's recommended)?
Hi,

1. It depends on your settings where are you storing the files.
2. I agree with this and there is a KB article how to get the nice URL of an attachment by creating a custom transformation function - How to get attachment data using API. I also agree there should be a nicer way doing this - I hope there will be some improvements soon :-)
3. Hierarchy is not possible, the attachments were not designed for this.
4. You can configure Media library folders per site - maybe I am missing something here but what is the issue here?

Best regards,
Juraj Ondrus

User avatar
Member
Member
ProxyCG - 4/27/2012 7:57:15 PM
   
RE:Product Images - In Media Library or Not (What's recommended)?
Thanks for the reply.

On #4 I am assuming then that you can create the separate libraries and instead of media they can hang off the root as images/productimages for example.

Also related question, is there a way on the product detail page to get the image url to show site1/productimages.product.jpg instead of it coming back with a trailing backslash for extensionless urls or with the resizing parameters like pic.aspx?maxsidesize=150



And, how would you implement the reference that you gave in #2 for the image gallery or lightbox so the url looks, well normal vs


<img src="/getattachment/products/myproduct.jpg.aspx?maxsidesize=800" alt="This is my product">

with the ALT text being the description and not the name of the file that was uploaded as an attachment.

Thanks!



User avatar
Kentico Support
Kentico Support
kentico_jurajo - 4/30/2012 2:38:26 PM
   
RE:Product Images - In Media Library or Not (What's recommended)?
Hi,

I think I am getting little bit lost here :-)

I am not following you on the media libraries - for each site you can have separate library with a separate folder so the URL of the image will be different.

The next question depends on your URLs and SEO settings whether you require the trailing slash or not. The resizing parameter is quite important there, but I think that after some customization it could be removed.

And the last one - you can get all the attachment data using the API and then it is up to you how you will compose the URL markup with all the parameters you need and want.

Best regards,
Juraj Ondrus