Answer the question
In order to leave comments, you need to log in
Structure of storage of originals and miniatures of images on the server?
Actually the question is this. Let's say we will generate a path using md5 from a file, or just from an image ID, it doesn't matter. The question is a little different. How to store thumbnails for pictures?
1) use a prefix. You get something like:
/a5/e4/c7/18d7b47aedf325e9143bfce8cc.s.jpg
(or _s.jpg) The downside is that for the thumbnail each time you will need to parse the file name and add a prefix. Or start a special column for the cabinet in the database. /a5/e4/c7/thumb/18d7b47aedf325e9143bfce8cc.jpg
/thumbs/a5/e4/c7/18d7b47aedf325e9143bfce8cc.jpg
Answer the question
In order to leave comments, you need to log in
IMHO, for a disk subsystem the first variant is the most productive. It can be slightly modified, storing the file name without extension in the database, adding a suffix and extension when inserted into the page. In the database, then it is enough to keep a sign of the presence of a thumbnail.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question