{ "info": { "author": "Patrick Dengler", "author_email": "info@patrickdengler.de", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Framework :: Wagtail", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "# Wagtail Lazy Images\n\n\nTemplate tags that generate tiny blurry placeholder images alongside your wagtail images in order to lazy-load them medium.com style.\n\n\n## Installing\n\n\nInstall using pip:\n ```\n pip install wagtail-lazyimages\n ```\n\n## Usage\n\n1. Add `wagtail_lazyimages` to your `INSTALLED_APPS` setting like this:\n ```\n INSTALLED_APPS = [\n ...\n 'wagtail_lazyimages',\n ]\n ```\n\n2. Load the `lazyimages_tags` template tag library in your template:\n ```\n {% load \"lazyimages_tags\" %}\n ```\n\n3. Replace wagtail's `image` tag with `lazy_image` for images that should lazy load:\n ```\n {% lazy_image page.photo width-960 class=\"lazy\" %}\n ```\n\n This template tag behaves just like wagtail's `image` tag with the exception that it generates an additional scaled down and blurred placeholder image. The URL of the placeholder image will appear in the `src` attribute of the image tag while the large version will be referenced in `data-src`:\n ```\n \n ```\n\n4. In the front end: Implement the lazy loading functionality yourself or use a dedicated JavaScript library like [lozad.js](https://apoorv.pro/lozad.js):\n\n ```\n const observer = lozad('.lazy');\n observer.observe();\n ```\n\n\n### Image in context variable\n\nIf you need to assign the image data to a template variable using Django's `as` syntax, use the provided `lazy_image_url` template tag for getting just the URL of the placeholder image:\n\n {% load \"lazyimages_tags\" %}\n\n {% image page.photo width-960 as img %}\n\n \"{{\n\n\n### Alternative attribute\n\nIf you want to use a different attribute for referencing the original image than `data-src` use the parameter `lazy_attr` for that:\n\n {% lazy_image page.photo width-960 lazy_attr=\"data-lazy-url\" class=\"lazy\" %}", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ptrck/wagtail-lazyimages/", "keywords": "", "license": "BSD License", "maintainer": "", "maintainer_email": "", "name": "wagtail-lazyimages", "package_url": "https://pypi.org/project/wagtail-lazyimages/", "platform": "", "project_url": "https://pypi.org/project/wagtail-lazyimages/", "project_urls": { "Homepage": "https://github.com/ptrck/wagtail-lazyimages/" }, "release_url": "https://pypi.org/project/wagtail-lazyimages/0.1.3/", "requires_dist": null, "requires_python": "", "summary": "A wagtail plugin that generates tiny blurry placeholder images for lazy-loading.", "version": "0.1.3" }, "last_serial": 5809610, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "73a3c29c92c6b503acb67790a0ba8296", "sha256": "10daa58daea5f8b12bd0a2ef8ce4559ead2c427f459b7dfca29a27e2fc3a889d" }, "downloads": -1, "filename": "wagtail-lazyimages-0.1.tar.gz", "has_sig": false, "md5_digest": "73a3c29c92c6b503acb67790a0ba8296", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3908, "upload_time": "2019-09-08T17:46:13", "url": "https://files.pythonhosted.org/packages/8b/d6/895a29927738ecdf2951b5dff3b2b9c17139937ef2894fa4c90d888e98c3/wagtail-lazyimages-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "b83a48289769818c8722654ae6ed52a1", "sha256": "2edc041e310f11d6d979dfa13d970357e47a2b17ec58fbf0927c20824ff7a6ba" }, "downloads": -1, "filename": "wagtail-lazyimages-0.1.1.tar.gz", "has_sig": false, "md5_digest": "b83a48289769818c8722654ae6ed52a1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3986, "upload_time": "2019-09-08T20:16:59", "url": "https://files.pythonhosted.org/packages/58/ba/17a723c4b526f8ab16af56c9931219bdf21164d9d91b496750a22f596365/wagtail-lazyimages-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "e069f3e255a696eba41fdf38cd6e2130", "sha256": "d0bac60452496da32f43b8d282dde6d4c510052841652635a067eb12e8f8e7bc" }, "downloads": -1, "filename": "wagtail-lazyimages-0.1.2.tar.gz", "has_sig": false, "md5_digest": "e069f3e255a696eba41fdf38cd6e2130", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4042, "upload_time": "2019-09-09T17:41:43", "url": "https://files.pythonhosted.org/packages/2d/57/0ec4c1c5f039e55e4efe017f23cdeb6b48b3c3a9ca5f7ba41a5fd39ef56f/wagtail-lazyimages-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "be270d14d18a2556532123021b61d121", "sha256": "fd5e4c2983e095d1ae85f565fb92b1e4c93e79ce1b618b88cc5d4e10bcb6e767" }, "downloads": -1, "filename": "wagtail-lazyimages-0.1.3.tar.gz", "has_sig": false, "md5_digest": "be270d14d18a2556532123021b61d121", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5335, "upload_time": "2019-09-10T15:23:48", "url": "https://files.pythonhosted.org/packages/f6/ab/ffbbd4918f0f865ba1f0b0966395dc7e8241ee51526edb51a05eb0633610/wagtail-lazyimages-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "be270d14d18a2556532123021b61d121", "sha256": "fd5e4c2983e095d1ae85f565fb92b1e4c93e79ce1b618b88cc5d4e10bcb6e767" }, "downloads": -1, "filename": "wagtail-lazyimages-0.1.3.tar.gz", "has_sig": false, "md5_digest": "be270d14d18a2556532123021b61d121", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5335, "upload_time": "2019-09-10T15:23:48", "url": "https://files.pythonhosted.org/packages/f6/ab/ffbbd4918f0f865ba1f0b0966395dc7e8241ee51526edb51a05eb0633610/wagtail-lazyimages-0.1.3.tar.gz" } ] }