diff --git a/hub/services/admin/images.py b/hub/services/admin/images.py
index 917d0db..761fd2d 100644
--- a/hub/services/admin/images.py
+++ b/hub/services/admin/images.py
@@ -72,6 +72,8 @@ class ImageLibraryAdmin(admin.ModelAdmin):
Display small thumbnail in list view.
"""
if obj.image:
+ # Use img tag for all images in list view to maintain clickability
+ # SVG files will still display correctly with img tag
return format_html(
'',
obj.image.url,
@@ -85,10 +87,23 @@ class ImageLibraryAdmin(admin.ModelAdmin):
Display larger preview in detail view.
"""
if obj.image:
- return format_html(
- '
',
- obj.image.url,
- )
+ if obj.is_svg():
+ # For SVG files in detail view, use object tag for better rendering
+ # This is only for display, not for clickable elements
+ return format_html(
+ '
{} - {}x{} - {}
' + '{} - {}x{} - {}{}
' "