Image crop

To enable image-cropping (for example if you want to limit the uploaded images to a common format) you can use data-crop on the image element. Use data-ratio='0.75' to set a default ratio. Use data-portrait='true' to make portrait default.

Available options

  • data-ratio="1" - will set default ratio.
  • data-crop-ratio="false" - disable the options to change crop ratio.
  • data-toolbar-hidden - hide the toolbal.
  • data-portrait="false" - hide the portrait option.

Ligthtbox

To enable image ligtbox call af.common.enableAfLightBox('.imageContainer') and mark images link with data-aflightbox tag. Aditionally data-aflightbox-title="someTitle" can be defined.

By adding container it will list only images from target container. If no container specified, by default it will list all images from body element marked with data-aflightbox tag