diff --git a/imagekit/templatetags/imagekit.py b/imagekit/templatetags/imagekit.py index 3169481..a1731a5 100644 --- a/imagekit/templatetags/imagekit.py +++ b/imagekit/templatetags/imagekit.py @@ -78,6 +78,28 @@ def generateimage(parser, token): """ Creates an image based on the provided arguments. + By default:: + + {% generateimage 'myapp:thumbnail' from=mymodel.profile_image %} + + generates an ```` tag:: + + + + You can add additional attributes to the tag using "with". For example, + this:: + + {% generateimage 'myapp:thumbnail' from=mymodel.profile_image with alt="Hello!" %} + + will result in the following markup:: + + Hello! + + For more flexibility, ``generateimage`` also works as an assignment tag:: + + {% generateimage 'myapp:thumbnail' from=mymodel.profile_image as th %} + + """ varname = None