{ "info": { "author": "Dmitriy Chukhin", "author_email": "dchukhin@caktusgroup.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "======================\ndjango_optimized_image\n======================\n\ndjango_optimized_image is a simple Django library that allows optimization\nof images by using `TinyPNG `_ or `Pillow `_.\n\nDetailed documentation is in the \"docs\" directory.\n\nQuick start\n-----------\n\n1. Add \"optimized_image\" to your INSTALLED_APPS setting like this::\n\n INSTALLED_APPS = [\n ...\n 'optimized_image',\n ]\n\n Optionally, add a setting that lists the file extensions that will be ignored during image optimization (or an empty list to allow all) ::\n\n # ignore GIFs\n OPTIMIZED_IMAGE_IGNORE_EXTENSIONS = ['gif']\n\n # either case is fine; this works too\n OPTIMIZED_IMAGE_IGNORE_EXTENSIONS = ['GIF']\n\n2. You have the option to use either TinyPNG or Pillow for optimizing images.\n Inform ``optimized_image`` which one you want to use by setting the following::\n\n # To use Pillow\n OPTIMIZED_IMAGE_METHOD = 'pillow'\n # To use TinyPNG\n OPTIMIZED_IMAGE_METHOD = 'tinypng'\n\n Any other string that is set for this setting will mean that optimization does\n not occur. If you are unsure of whether you would like to use TinyPNG or Pillow,\n feel free to consult the documentation of each.\n\n If you choose to use TinyPNG, you will need to get an API key from\n TinyPNG. Visit https://tinypng.com/developers for more details on getting an\n API key. Once you have done so, add the following setting to your settings\n file. Note: it is a good idea to keep this secret::\n\n TINYPNG_KEY\n\n3. Migrate the optimized_image models::\n\n python manage.py migrate optimized_image\n\n4. You may use the ``OptimizedImageField`` by importing it::\n\n\n from django.db import models\n\n from optimized_image.fields import OptimizedImageField\n\n\n class MyModel(models.Model):\n ...\n image = OptimizedImageField()\n\n and saving images into it, the same way you would to a Django ``ImageField``.\n The optimized image will be saved into the ``url`` field in place of the\n unoptimized image.\n\n5. If you want to change legacy models with Django's Image fields and\n optimize the images in those fields, you may do so for legacy models\n by passing a list of legacy model classes (not their instances) to\n the following function::\n\n from optimized_image.utils import optimize_legacy_images_in_model_fields\n optimize_legacy_images_in_model_fields([LegacyModelClass1, LegacyModelClass2])\n\n Note: this function makes calls to TinyPNG and S3, so it can take a really\n long time, depending on how many images you have. You may pass in 1\n for the verbosity parameter to get logs on the progress::\n\n optimize_legacy_images_in_model_fields([LegacyModelClass1, LegacyModelClass2], verbosity=1)\n\n Note about TinyPNG API keys: If you obtain the free TinyPNG API token, you are limited to 500\n image optimizations per month, so this function may fail if you have a\n lot of images. You may either obtain a paid API key, or wait until next month.\n", "description_content_type": "", "docs_url": null, "download_url": "https://github.com/dchukhin/django_optimized_image/tarball/0.2.0", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/dchukhin/django_optimized_image", "keywords": "django", "license": "BSD License", "maintainer": "", "maintainer_email": "", "name": "django-optimized-image", "package_url": "https://pypi.org/project/django-optimized-image/", "platform": "", "project_url": "https://pypi.org/project/django-optimized-image/", "project_urls": { "Download": "https://github.com/dchukhin/django_optimized_image/tarball/0.2.0", "Homepage": "https://github.com/dchukhin/django_optimized_image" }, "release_url": "https://pypi.org/project/django-optimized-image/0.2.0/", "requires_dist": null, "requires_python": "", "summary": "A simple Django app that allows for optimization of images.", "version": "0.2.0" }, "last_serial": 4925814, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "2b679041d1e3bd01b1ce963410a6654e", "sha256": "03f40c0d48a460a07d747d61be7e01366a601b3629eef1d7f6099d6ddab27308" }, "downloads": -1, "filename": "django-optimized-image-0.0.1.tar.gz", "has_sig": false, "md5_digest": "2b679041d1e3bd01b1ce963410a6654e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8922, "upload_time": "2017-01-13T15:52:56", "url": "https://files.pythonhosted.org/packages/2c/26/2ff858be3f5a775843fe45e9ae71078260f07869d1ffd7149a8b2fd14c74/django-optimized-image-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "bbd3d164fbb7c6de0c94709ef01297c7", "sha256": "448aedd8104a99dec890b8dc154383fc3eb155df26666ae2287b84d678fdd3ca" }, "downloads": -1, "filename": "django-optimized-image-0.0.2.tar.gz", "has_sig": false, "md5_digest": "bbd3d164fbb7c6de0c94709ef01297c7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8916, "upload_time": "2017-01-13T16:06:14", "url": "https://files.pythonhosted.org/packages/af/47/0e1e44bbd98590029ecd3a1f5da85e889b30bc693fbe5eb40fb6c850a202/django-optimized-image-0.0.2.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "b2b7818f964bb24a8094becd7acb5481", "sha256": "e03eb424e70272f3b89eb761e492cdef8b3be5e7f270bc7c6bb87969000e7816" }, "downloads": -1, "filename": "django-optimized-image-0.1.0.tar.gz", "has_sig": false, "md5_digest": "b2b7818f964bb24a8094becd7acb5481", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8015, "upload_time": "2018-01-14T19:40:59", "url": "https://files.pythonhosted.org/packages/64/05/d0aeec89801aeda86aaf2660e25f6923a469be27b83f8c80383d75c6f37f/django-optimized-image-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "2e578f74bd4ff289b07176afd92c6198", "sha256": "14686876682c1910707b23fd8738d7f1e13ab869bd598c792ddac26e062ba671" }, "downloads": -1, "filename": "django-optimized-image-0.2.0.tar.gz", "has_sig": false, "md5_digest": "2e578f74bd4ff289b07176afd92c6198", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8160, "upload_time": "2019-03-11T16:00:39", "url": "https://files.pythonhosted.org/packages/6c/42/1c6ac0a9efb007ff90f93fcc8c994f15a9d5bafe6680d54acf1b1d4bfe85/django-optimized-image-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2e578f74bd4ff289b07176afd92c6198", "sha256": "14686876682c1910707b23fd8738d7f1e13ab869bd598c792ddac26e062ba671" }, "downloads": -1, "filename": "django-optimized-image-0.2.0.tar.gz", "has_sig": false, "md5_digest": "2e578f74bd4ff289b07176afd92c6198", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8160, "upload_time": "2019-03-11T16:00:39", "url": "https://files.pythonhosted.org/packages/6c/42/1c6ac0a9efb007ff90f93fcc8c994f15a9d5bafe6680d54acf1b1d4bfe85/django-optimized-image-0.2.0.tar.gz" } ] }