Added support for integrating a caption, alignment, and URL with an image field
Sometimes you need to store a caption, URL, or alignment with an image. Previously, you needed to create separate fields. That worked fine, but now you can integrate those into the image field.
When adding or editing image fields, you can independently turn on the Caption, Alignment, or URL fields. By default, they are off. If they are enabled, then they will show with the image field below the Image Description field.
This can be useful for consolidating fields in the administration and for more closely aligning those fields with the image.
The data will be made available to the templates as part of the image object data as these values:
- alignment (left, center, right)
- caption
- url
If the image has a URL, then you can do to output the image tag wrapped in the link tag. (Change "image" for your image variable.)