Skip to content

Commit

Permalink
feat: imagefield linked pictures (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasvinclav committed Sep 22, 2023
1 parent f47c147 commit d367862
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/unfold/templates/admin/widgets/clearable_file_input.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

{% if widget.attrs.accept == 'image/*' and widget.is_initial %}
<div class="bg-gray-50 border mb-4 p-1 rounded-md w-48">
<img src="{{ widget.value.url }}" alt="{% trans 'Image preview' %}" class="rounded" />
<a href="{{ widget.value.url }}">
<img src="{{ widget.value.url }}" alt="{% trans 'Image preview' %}" class="rounded" />
</a>
</div>
{% endif %}

Expand Down

0 comments on commit d367862

Please sign in to comment.