Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6106925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:07:55+00:00 2026-05-23T14:07:55+00:00

I have a search engine where each product item can have a thumbnail image

  • 0

I have a search engine where each product item can have a thumbnail image for the summary and a larger image for the detail view.

Currently the image ids are stored as img_id and thumb_id in the Products table, and the attributes are kept in the Image table, (width, height, type) which needs a join to construct the image tag. Images are kept on a sub domain.

Products table has several million rows but not all products have images.

Should I do away with the image table and if so what method would you suggest to fetch the images?

Also there other smaller product catelogs being served on this system which have similar table structure

Thanks in advance.

I think what im looking for is here How to store images in your filesystem

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T14:07:55+00:00Added an answer on May 23, 2026 at 2:07 pm

    You should think about the trade off between “optimal image saving” with different types (jpg, gif, …) and different imageURLs against the need safe all this information separately. An alternative would be the following:

    • safe every image as jpg, for example
    • use as image name $rowID_thumb.jpg and $rowID.jpg
    • to avoid problems with your file system (over a certain value some file systems can’t handle a huge amount of data) you could create a directory clustering, for example 1/123/1234/123467.jpg, where 1234567 is the $rowID
    • Think about fixed dimensions of your images to avoid the need to save width and height. There are enough image manipulation functions in php to get all the images to the same size

    I would not store the name of the image in the db to save your independence 😉 In detail: you have a shop item with the ID 123. For this shop item exist an normal image an a thumbnail (only two images, otherwise my proposal is not the best solution!). I would not store anything about the images in the DB. Instead, use the ID 123 of the shop item to generate the filename programmatically, like getImagePathAndFilename($id) -> 1/123/123.jpg. In your upload process you have to take care that all the images have the same dimensions to avoid the need to save them separately.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a search engine that searches albums. For each music album, I have
I have a some problems with my self-made php+sql search engine. Can You tell
I have a custom search engine on a non-wordpress page. This search engine searches
Which search engine would you recommend for a Commerce website? We have millions of
I have a TYPO3 site with Indexed Search Engine extension... The problem is that
I have asked What should i know about search engine crawling? Now i would
I have been trying to create a new google custom search engine, but when
I have read a great deal of discussions about javascript templating and Search Engine
I have built UI, its like a search engine for BioProcess/Disease--> Genes. e.g., User
On my site I have mod_rewrite rules to make the URLs more search engine

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.