{
"info": {
"author": "Pancentric Ltd",
"author_email": "devops@pancentric.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 :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content"
],
"description": "Django imgix\n============\n\n[](https://travis-ci.org/pancentric/django-imgix)\n\nA simple Django application for creating [Imgix](https://www.imgix.com/ \"Imgix\") formatted image links in your templates\n\n\nInstallation\n------------\n\nDependencies:\nThis app requires Django > 1.4 and imgix>0.1\n\n\n1. Run ``` pip install django-imgix ```\n2. Add ``` 'django_imgix' ``` to your ``` INSTALLED_APPS ```:\n\n\n\n\n```\n\tINSTALLED_APPS = (\n\t\t...\n\t\t'django_imgix',\n\t)\n```\n\n\n----------\n\n\nConfiguration\n-------------\nThere are a few settings you can use to configure how django-imgix works:\n\n**IMGIX_DOMAINS** (*required*)\n\nGive the domain name, or list of domain names, that you have registered with Imgix:\n\n```\nIMGIX_DOMAINS = 'my-domain.imgix.net'\n...\nor\n...\nIMGIX_DOMAINS = [\n\t'my-domain-1.imgix.net',\n\t'my-domain-2.imgix.net',\n\t'my-domain-3.imgix.net',\n\t]\n```\n\n**IMGIX_HTTPS**\n\nBoolean value, defaults to `False` if not specified. If set to `True` it enables HTTPS support.\n\n**IMGIX_SIGN_KEY**\n\nIf you want to produce signed URLs you need to enable secure URLs in the 'Source' tab in your Imgix.com account. This will generate a secret key that you need to specify here, e.g.\n\n```\nIMGIX_SIGN_KEY = 'jUIrLPuMEm2aCRj'\n```\n\nThis will make a hash from the image url and all parameters that you have supplied, which will be appended as a url parameter `s=hash` to the image, e.g.\n\n`https://my-domain.imgix.net/media/images/dsc_0001.jpg?fm=jpg&h=720&w=1280s=976ae7332b279147ac0812c1770db07f`\n\n\n**IMGIX_DETECT_FORMAT**\n\nBoolean value, defaults to `False` if not specified. If set to `True` django-imgix will automatically detect popular image extensions and apply the `fm=image_extension` attribute to the image url, where `image_extension` is one of the formats listed [here](https://www.imgix.com/docs/reference/format#param-fm \"Imgix fm parameter\")\n\n\nExample:\n```\n{% load imgix_tags %}\n{% get_imgix '/media/images/dsc_0001.jpg' w=1280 h=720 %}\n```\nwill produce\n\n`https://my-domain.imgix.net/media/images/dsc_0001.jpg?fm=jpg&h=720&w=1280`\n\n\nCurrently supported image formats for IMGIX_DETECT_FORMAT are jpg, jpeg, png, gif, jp2, jxr and webp.\n\n\n**IMGIX_ALIASES**\n\nRead about aliases in the **Usage** section below.\n\n\n----------\n\n\nUsage\n-----\n\nDjango-imgix's functionality comes in the form of a template tag, `get_imgix`, that gets an image url as its first argument and then an N number of optional arguments:\n\n```\n{% load imgix_tags %}\n
\n```\n\nYour `'image_url'` should be a relative URL, as it will be appended to a domain specified in `IMGIX_DOMAINS`, to form an absolute URL.\n\nYou can add as many `key=value` pairs as you want. Each `key=value` pair results in a url parameter\nthat Imgix can recognise and use to generate your thumbnail.\n\nFor a full list of supported parameters, see [here](https://www.imgix.com/docs/reference/ \"Imgix API reference\")\n\n\nThere is a special argument, `wh=WIDTHxHEIGHT`, which is made specifically so that transition from other image processing libraries such as **easy_thumbnails** is easier.\nFor example,\n\n`{% get_imgix '/media/images/dsc_0001.jpg' wh='1280x720' %}`\n\nis the same as saying\n\n`{% get_imgix '/media/images/dsc_0001.jpg' w=1280 h=720 %}`\n\nwhich resolves to\n\n`http://my-domain.imgix.net/media/images/dsc_0001.jpg?h=720&w=1280`\n\n`wh` will take precedence over `w` and `h` arguments, unless you use a 0 as one of the values in `wh`, e.g.\n\n`{% get_imgix '/media/images/dsc_0001.jpg' wh='1280x0' w='777' h='555' %}`\n\nwill result in\n\n`http://my-domain.imgix.net/media/images/dsc_0001.jpg?h=555&w=1280`\n\n#### **Aliases**\n\nIf you don't want to list all your `key=value` parameters inline all the time, you can group them into aliases.\n\nTo do that, first specify the aliases in your settings file:\n```\nIMGIX_ALIASES = {\n 'alias_one': {'w': 200, 'h': 300, 'lossless': 1, 'auto': 'format'},\n 'alias_two': {'w': 450, 'h': 160, 'fm':'jpg', 'q': 70 },\n }\n\n```\n\nThen, in your template, either simply provide the alias name as the first unnamed argument, or use `alias='alias_name'`:\n```\n{% load imgix_tags %}\n
\n... or ...\n
\n```\n\nProviding an alias means that any other arguments will be ignored.",
"description_content_type": null,
"docs_url": null,
"download_url": "UNKNOWN",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/pancentric/django-imgix",
"keywords": null,
"license": "BSD License",
"maintainer": null,
"maintainer_email": null,
"name": "django-imgix",
"package_url": "https://pypi.org/project/django-imgix/",
"platform": "UNKNOWN",
"project_url": "https://pypi.org/project/django-imgix/",
"project_urls": {
"Download": "UNKNOWN",
"Homepage": "https://github.com/pancentric/django-imgix"
},
"release_url": "https://pypi.org/project/django-imgix/1.1.0/",
"requires_dist": null,
"requires_python": null,
"summary": "Django app to generate imgix urls in your templates.",
"version": "1.1.0"
},
"last_serial": 2254969,
"releases": {
"0.1": [],
"1.0.0": [
{
"comment_text": "",
"digests": {
"md5": "bd7a58411344ff2e612351b64fdbc560",
"sha256": "d1b78923ab22b26fa0ccd5506b9bac0f8746a363e75157a388683a85a6dcbd34"
},
"downloads": -1,
"filename": "django-imgix-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "bd7a58411344ff2e612351b64fdbc560",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7468,
"upload_time": "2015-10-27T16:33:25",
"url": "https://files.pythonhosted.org/packages/1e/95/84ba694ccae510776339db0203739c16f3513c672668a953cdcda67c6553/django-imgix-1.0.0.tar.gz"
},
{
"comment_text": "",
"digests": {
"md5": "1219a65d7c32f3a0460395dd804fce01",
"sha256": "02a25178f9dc7d72c31e2c58f0974209d1e5de6695d395102671e5121e9fc2f2"
},
"downloads": -1,
"filename": "django-imgix-1.1.0.tar.gz",
"has_sig": false,
"md5_digest": "1219a65d7c32f3a0460395dd804fce01",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 9197,
"upload_time": "2016-02-29T17:53:51",
"url": "https://files.pythonhosted.org/packages/6e/31/212d276a55c67e69ea91886bf304e29cd64fc2e3fdacf28d76add829d72d/django-imgix-1.1.0.tar.gz"
}
],
"1.1.0": []
},
"urls": []
}