{% extends "base_template.html" %} {% block title %}{{ item.title or item.filename }} — {{ _('Media') }}{% endblock %} {% block head %} {# Cropper.js styles, served LOCALLY as a media feature asset (never a CDN). #} {% endblock %} {% block content %}

{{ _('Edit media') }}

← {{ _('Back to library') }}
{% with messages = get_flashed_messages(with_categories=true) %} {% for category, message in messages %}
{{ message }}
{% endfor %} {% endwith %}
{% if item.is_image %}
{{ _('Preview') }}
{{ item.alt or item.title }}

{{ _('The original is preserved; the crop is saved as a new media item.') }}

{% else %}

{{ _('This file is not an image, so it cannot be cropped.') }}

{% endif %}

{{ _('Details') }}

{{ _('Filename') }}
{{ item.filename }}
{{ _('URL') }}
{{ item.url }}
{{ _('Type') }}
{{ item.mime_type or '—' }}
{{ _('Dimensions') }}
{% if dimensions %}{{ dimensions[0] }} × {{ dimensions[1] }} px{% else %}—{% endif %}
{{ _('File size') }}
{{ '%.1f'|format((item.size or 0) / 1024) }} KB
{{ _('Uploaded') }}
{{ item.uploaded_at.strftime('%Y-%m-%d %H:%M') if item.uploaded_at else '—' }}
{% if item.source_url %}
{{ _('Source') }}
{{ item.source_url }}
{% endif %}

{{ _('Metadata') }}

{% endblock %} {% block scripts %} {% if item.is_image %} {# Cropper.js, served LOCALLY as a media feature asset (never a CDN). #} {% endif %} {% endblock %}