Package: django-multires
Django-multires is a plug-and-play Django app for managing multiple image resolutions in a db-driven approach.Why another libImages are important aspect of web development. However they come at a price of extra bandwidth due to their size which especially becomes important on mobile devices. To handle this, some sites generate multiple resolutions of each image to serve to different devices or network conditions. The usual approach in doing so is to define ahead of time terms for different levels of resolutions which will be available. For example athumbnailcould be an image up to200x200,high-resbe up to2500x2500, etc. This is what most of the current image-management Django apps do such aseasy-thumbnails. In case ofeasy_thumbnails, these presets are called aliases and some of them even allow to define more advanced options such as crop, rotation, etc. This allows for some advanced uses such as if need to generate image gallery thumbnails cropped square. That is until in one of images a face will be cropped out due to the fact that original image and gallery thumbnails are not of the same aspect ratio hence some regions need to be cropped. This results in adding a field to a model for square thumbnail image. Then of course you need the same image for the landing page banner which should be of 16x9 aspect ratio. That again cropps the image in unpleasing fashion so you end up adding another field. You can probably see where this is going.This library does not require to hard code any rules as to how the images will be processed. All rules are stored in a database. So if a need arises to apply a special treatment to any specific image, it is just a matter of creating another rule in db on how to process that specific image. Additional advantage of this approach is that it becomes much easier to change these rules once the application is deployed (no need to change anything insettings.py).OverviewAs discussed inWhy another lib, this library approaches a problem of managing multiple image resolutions in more database-driven way. Each rule how the image should be processed is represented by aMultiresRecipemodel and each processed image is represented byMultiresImagemodel. Using them directly can be tedious  however you can use a lightweight wrapperMultiresImageFieldaroundImageFieldfor more simple API:from multires import MultiresImageField, MultiresRecipe

# a simple thumbnails recipe
# usually would create this in Django admin
recipe = MultiresRecipe.objects.get_or_create(
    title='thumbnail',
    description='Recipe for thumbnails',
    namespace='abc',
    width=200, height=200,
    file_type='jpeg', quality=80
)[0]

# some test data
class FooModel(models.Model):
    image = MultiresImageField(upload_to='foo', namespace='abc')
foo = FooModel.objects.create(image=...)

# get multires image for foo's image
image = foo.image.get_multires_image(recipe)

# get lazy url for thumbnail image
print(image.image.url)

# or process it manually
image.process()

# get the url for the processed image as per MEDIA_URL
# since image has been already processed
print(image.image.url)InstallationSince this package is still in development, no stable version has been uploaded to PYPI yet. You can however install it as adeveloperversion:$ pip install django-multires==devOnce installed, add it to theINSTALLED_APPS:INSTALLED_APPS = (
    ...,
    'multires',
    ...
)And then do the syncdb to create the necessary db tables:$ python manage.py syncdbAdd the multires urls to Django’s root urls config to enable lazy urls:urlpatterns = patterns(
    ...
    url(r'^multires/', include('multires.urls', namespace='multires')),
)CreditsCurrent maintainers:Miroslav Shubernetskiy -GitHubLicenseThe source code can be found at GitHubhttps://github.com/miki725/django-multires.This library is licensed withMIT License:Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.