<div class="md-image align-{{ align }}">
  <div class="md-image-wrap" data-alpha="{% if may_have_alpha %}1{% else %}0{% endif %}">
    <a href="{{ direct_url }}">
      <div style="background: url('{{ url }}') no-repeat; background-size: contain; width: {{ w }}px; padding-top: {{ padding_top }}%;"></div>
    </a>
  </div>
  {% if unsafe_note and not nolabel %}
    <div class="md-image-note">{{ unsafe_note|raw }}</div>
  {% endif %}
</div>