mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-25 00:36:11 -06:00
Closes #9410: adding HEIF image format support
This commit is contained in:
parent
edb5220228
commit
fbcb439384
@ -3,7 +3,7 @@ from django.db.models import Q
|
||||
from .choices import InterfaceTypeChoices
|
||||
|
||||
# Exclude SVG images (unsupported by PIL)
|
||||
DEVICETYPE_IMAGE_FORMATS = 'image/bmp,image/gif,image/jpeg,image/png,image/tiff,image/webp'
|
||||
DEVICETYPE_IMAGE_FORMATS = 'image/bmp,image/gif,image/jpeg,image/png,image/tiff,image/webp,image/heic'
|
||||
|
||||
|
||||
#
|
||||
|
@ -24,6 +24,10 @@ import django
|
||||
from django.utils.encoding import force_str
|
||||
django.utils.encoding.force_text = force_str
|
||||
|
||||
try:
|
||||
from pillow_heif import HeifImagePlugin
|
||||
except ImportError:
|
||||
HeifImagePlugin = None
|
||||
|
||||
#
|
||||
# Environment setup
|
||||
|
@ -37,3 +37,6 @@ jsonschema==3.2.0
|
||||
|
||||
# Temporary fix for #10712
|
||||
swagger-spec-validator==2.7.6
|
||||
|
||||
# Pillow's plugin for HEIF image format
|
||||
pillow-heif==0.7.0
|
||||
|
Loading…
Reference in New Issue
Block a user