S
S
StuGGs2015-01-10 22:32:24
Images
StuGGs, 2015-01-10 22:32:24

What is the correct way to delete images on the server and give the images to the user?

Suppose the image storage is implemented in the form:
imgs/a/b/c/abcsef.jpg
imgs/c/b/d/cbdfgh.gif
and so on.
1) The path to the image is stored in the database. There is a special field, when set to 1 (true), the image is considered deleted. As far as I know, immediately deleting an image is bad for the file system + load on the server. How to delete images correctly (massively - accumulating a certain amount)? Then, what then, because there will be a strong fragmentation.
2) What is better, to form an image on the fly? Or store, for example, a reduced copy of the file?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
X
xmoonlight, 2015-01-10
@StuGGs

1. Remove immediately.
2. Cache all the necessary image formats.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question