{% load displaypage_tags media_tags %} {# Media-browser picker writing a Media id into its hidden field (section-editor.js). Context: field, type (image / video / audio / pdf, or "" for any file), label; optional hint, show_if, rule (media rule key: the picker carries its minimum size and mobile crop, see mediaapp/rules.py), crop_from (the picker field to crop this image from: adds a "Crop from main image" button, shown while that picker's rule has a mobile aspect) and crop_aspect (width / height of the crop; forces the button on and overrides the rule's aspect). #} {% dp_field_media field as media %} {% if crop_from %}{% dp_field_media crop_from as crop_source %}{% endif %}