Hi,
I want to develop a module that creates a content type with an extra image field. the image should have a thumbnail.

1-Is that better to create the thumbnail and store it separately from original image, or store the original image and make the thumbnail every time needed?

2-Is that better to store these files in the {files} table or in a new schema?

thanks in advance.

Comments

blueflowers’s picture

Our experience with auto-sizing of thumbnails is a double-edge sword. Obviously it's easier to use something like imagecache to automatically resize the thumbnails, but it also depends on how much control you need on how the thumbnails are displayed. If the images are of the same aspect ratio from large to small then imagecache is definately the best way to go. If they are not and you really don't want (for example) cropping to happen, Then you should have a seperate field.

As far as your second question goes. I would say storing them in the files tables will be better in the long run especially if you have revision control enabled. Even CCK image/file fields are stored here.

Hope that helps

dragon2000’s picture

If I make the thumbnail at processing time it doesn't make processing load?

blueflowers’s picture

using imagecache, the processing will happen the first time that image is loaded. After that the image is physically located in the files folder. We haven't run into any problems with performance.