In my project I'am working with images. I don't know how to organize the management of images.
I need to dynamically upload the pictures and resize them.
First question - what is the best way to dynamically upload images with progress bar and without flash? I found this and this, but I believe there is a better way.
Second question. I have to save one image in different sizes. I won't use these thumbnails on my pages, but another application will. Many clients could upload images at the same time. This means that I can not resize all the images at the same time. How should I organize this p开发者_运维问答rocess?
Is there are a better ready-to-use solution for image management issue?
django-photologue could be a good starting point for organizing the management of your images.
The PhotoSize
model can be used to automatically resize/crop your images, and the GalleryUpload
model allows the user to upload an archive of images.
You can also create PhotoSize
models with pre_cache = False
. This means that your images will dynamically created the first time they are requested.
For your second question you might use a task queue, like django-celery or django-tasks.
For the image crop, try Python Imaging Library (PIL)
精彩评论