Answer the question
In order to leave comments, you need to log in
How to save and display thumbnails for a site?
Good day to all, I want to save only the path to the main image in the database, then resize and save the thumbnail with the -thumbs.jpg prefix in the folder with the main image, how to display the thumbnail correctly? Keeping the original filename without the extension and then adding -thumbs.jpg is not a very good idea, or what are the options for saving and displaying thumbnails.
Answer the question
In order to leave comments, you need to log in
Keep the file name, Only the file name or a relative path can be used. Only not absolute, because it can change.
And name the files whatever you like.
Let 's say
Names don't matter. Depends on your algorithm.
WordPress for example names files like thisuploads/origin-800x600.png
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question