diff --git a/Dockerfile b/Dockerfile index 5c66b34..badb7e3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,13 @@ -FROM ubuntu:24.04 +FROM ubuntu:26.04 LABEL maintainer="Specify Collections Consortium " RUN apt-get update && apt-get -y install --no-install-recommends \ ghostscript \ imagemagick \ - python3.12 \ - python3.12-venv \ + libheif-plugin-libde265 \ + python3.14 \ + python3.14-venv \ && apt-get clean && rm -rf /var/lib/apt/lists/* RUN groupadd -g 999 specify && \ @@ -19,7 +20,7 @@ WORKDIR /home/specify COPY --chown=specify:specify requirements.txt . -RUN python3.12 -m venv ve && ve/bin/pip install --no-cache-dir -r requirements.txt +RUN python3.14 -m venv ve && ve/bin/pip install --no-cache-dir -r requirements.txt COPY --chown=specify:specify *.py views ./ diff --git a/server.py b/server.py index e112024..777d246 100644 --- a/server.py +++ b/server.py @@ -177,8 +177,8 @@ def resolve_file(): root, ext = path.splitext(storename) - if mimetype in ('application/pdf', 'image/tiff'): - # use PNG for PDF thumbnails + if mimetype in ('application/pdf', 'image/tiff', 'image/heic', 'image/heif'): + # use PNG for PDF and HEIC thumbnails (ImageMagick can only read HEIC, not write) ext = '.png' scaled_name = "%s_%d%s" % (root, scale, ext) diff --git a/settings.py b/settings.py index 8c2d989..cd64d23 100644 --- a/settings.py +++ b/settings.py @@ -58,7 +58,7 @@ ORIG_DIR = 'originals' # Set of mime types that the server will try to thumbnail. -CAN_THUMBNAIL = {'image/jpeg', 'image/gif', 'image/png', 'image/tiff', 'application/pdf'} +CAN_THUMBNAIL = {'image/jpeg', 'image/gif', 'image/png', 'image/tiff', 'application/pdf', 'image/heic', 'image/heif'} # What HTTP server to use for stand-alone operation. # SERVER = 'paste' # Requires python-paste package. Fast, and seems to work good.