Documentation fix - renditions do not provide 'alt' (#1517)

This commit is contained in:
Matt Westcott 2015-07-15 11:31:47 +01:00
parent 8dbd51adf2
commit 3702b71363

View file

@ -146,7 +146,7 @@ Wagtail can assign the image data to another variable using Django's ``as`` synt
{% image self.photo width-400 as tmp_photo %}
<img src="{{ tmp_photo.url }}" width="{{ tmp_photo.width }}"
height="{{ tmp_photo.height }}" alt="{{ tmp_photo.alt }}" class="my-custom-class" />
height="{{ tmp_photo.height }}" alt="{{ self.photo.title }}" class="my-custom-class" />
This syntax exposes the underlying image "Rendition" (``tmp_photo``) to the developer. A "Rendition" contains just the information specific to the way you've requested to format the image i.e dimensions and source URL.