I have a Folder called “Gallery” inside which i have created a folder for Thumbails called “Gallery-Thumbs”, where i manually add thumbnails.
My question is whether it is better to manually add thumbnails or create thumbnails dynamically using “GD” or “ImageMagick”.
Problems with adding Thumbnails manually
- If i forget to add a thumbnail for photo the chain of the Gallery breaks
- It is tedious to resize all the images for creating the thumbnails
So does using PHP ImageProcessing function add additional overhead in creating thumbnails or is the correct approach?
— Updated for answering Queries
-
How you add images to the “gallery” folder?
- Through Direct file upload
-
How those images and thumbnails are accessed?
- I use glob to get list of files in respective folders
-
How do you (want to) map images to thumbnails?
- For thumbnails i use imageName-thumb.jpg,
so they appear in the list in the same order as they are in main image folder
- For thumbnails i use imageName-thumb.jpg,
Use PHP to create thumbnails once and save them in a “thumbnails” directory with the same file names. Then use these now-ready-to-be-used thumbnails directly.