Template tags

bambu_attachments.templatetags.attachments.attachments(value, obj, width=640)

Parse the copy inside value and look for shortcodes in this format:

<p>Here's an attachment</p>
<p>[attachment 1]</p>

Replace the shortcode with a full image, video or audio element, or download link

Parameters:
  • obj – The object against which attachments are saved
  • width – The width of images or audio/video tags (defaults to the ATTACHMENT_WIDTH SETTING)