You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.rst
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ Lazy srcset and image generation for Django. Minimum effort required. No databas
6
6
7
7
Django Lazy srcset will create all the markup and images you need to provide responsive images via the srcset attribute. All you need to do is install it, configure your breakpoints and use the ``{% srcset %}`` template tag.
8
8
9
-
All of the hard work (image generation and cacheing) is done by django-imagekit, by default this means images are generated just in time - lazily. Please see the `django-imagekit docs<https://django-imagekit.readthedocs.io>`_ for more info and configuration options.
9
+
All of the hard work (image generation and cacheing) is done by django-imagekit, by default this means images are generated just in time - lazily. Please see the `django-imagekit docs<https://django-imagekit.readthedocs.io>`_ for more info and configuration options.
10
10
11
11
SVG images are supported, they will not be converted or resized but width and height attributes are still generated.
12
12
@@ -60,16 +60,16 @@ Use the ``{% srcset %}`` template tag:
60
60
{# image is probably an ImageField #}
61
61
<img {% srcset image %} alt="Lovely and lazy" />
62
62
63
-
{# You can also provide relative image widths e.g. 4 - 3 - 2 - 1 col #}
64
-
<img {% srcset image 25 33 50%} />
63
+
{# You can also provide relative image widths e.g. for a 4 - 3 - 2 - 1 col degradation: #}
64
+
<img {% srcset image 25 33 50%} />
65
65
66
66
{# You can provide a path to a static file #}
67
67
<img {% srcset 'path/to/my/image.png' %} />
68
68
69
69
Whilst not required it is advisable to take a nap at this stage.
70
70
71
-
For further documentation and usage examples please read the source code for ``lazy_srcset/templatetags/lazy_srcset.py``.
71
+
For further documentation and usage examples please read the source code for `lazy_srcset/templatetags/lazy_srcset.py<https://github.com/Quantra/django-lazy-srcset/blob/master/lazy_srcset/templatetags/lazy_srcset.py#L98>`_.
72
72
73
-
Currently imagekit ``SourceGroup`` has not been implemented therefore the imagekit ``generateimages`` management command will not generate images for django-lazy-srcset. If you want to pre-generate images you can use ``render_to_string()`` your templates in an appropriate save method or signal. If you are using django-content-blocks this happens on publish anyway.
73
+
Currently imagekit ``SourceGroup`` has not been implemented therefore the imagekit ``generateimages`` management command will not generate images for django-lazy-srcset. If you want to pre-generate images you can ``render_to_string()`` your templates in an appropriate save method or signal. If you are using django-content-blocks this happens on publish anyway.
74
74
75
75
Clean up of unused files created by django-lazy-srcset is down to you, if you require it at all.
0 commit comments