You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just found out, that you can't use withoutEnlargement together with a focal point, when passing a width or height that is greater, than the width or height of the original image.
I tested this with multiple images.
The removal of the focal point resolved the issue.
To Reproduce
Directus Version: 10.10.7
Example:
Image Dimensions: 1024x732
Focal Point set to 512, 366 (when I remove the focal point it starts to work again)
FROM directus/directus:10.10.7
USER root
WORKDIR /directus
COPY . .
RUN corepack enable \
&& corepack prepare [email protected] --activate \
# Currently required, we'll probably address this in the base image in future release
&& chown node:node /directus
ENV HOME=/directus
USER node
RUN pnpm install directus-extension-api-viewer
RUN pnpm install directus-extension-sync
RUN pnpm install directus-extension-admin-panels
# Expose the port
EXPOSE 8055
docker-compose.yml
version: '3.8'
services:
database:
image: postgis/postgis:13-master
# Required when running on platform other than amd64, like Apple M1/M2:
platform: linux/amd64
volumes:
- ./data/database:/var/lib/postgresql/data
environment:
POSTGRES_USER: 'doadmin'
POSTGRES_PASSWORD: 'directus'
POSTGRES_DB: 'directus_dev'
ports:
- 5432:5432
# cache:
# image: redis:6
directus:
build:
context: .
dockerfile: Dockerfile
ports:
- 8055:8055
# volumes:
# - ./uploads:/directus/uploads
# If you want to load extensions from the host
# - ./extensions:/directus/extensions
depends_on:
- database
# - cache
env_file:
- ./.env
Directus Version
10.10.7
Hosting Strategy
Self-Hosted (Docker Image)
The text was updated successfully, but these errors were encountered:
Ohhh, good catch. Problem here is that resizing is a fundamental step when cropping to a focal point and depending on the params you must enlarge the image temporarily so that you can crop it down afterwards. This specific problem is happening here:
Important: I just noticed that sharps behavior for withoutEnlargement when providing larger params without a focal point is to actually just return the max dimensions. Mh.
Describe the Bug
I just found out, that you can't use withoutEnlargement together with a focal point, when passing a width or height that is greater, than the width or height of the original image.
I tested this with multiple images.
The removal of the focal point resolved the issue.
To Reproduce
Directus Version: 10.10.7
Example:
Image Dimensions: 1024x732
Focal Point set to
512, 366
(when I remove the focal point it starts to work again)Working URL:
http://192.168.0.80:8055/assets/073b87e9-6391-47e9-b671-709138414abd?format=auto&quality=85&fit=cover&width=1024&height=732&withoutEnlargement=true
URL's that don't work:
http://192.168.0.80:8055/assets/073b87e9-6391-47e9-b671-709138414abd?format=auto&quality=85&fit=cover&width=1024&height=733&withoutEnlargement=true
http://192.168.0.80:8055/assets/073b87e9-6391-47e9-b671-709138414abd?format=auto&quality=85&fit=cover&width=1025&height=733&withoutEnlargement=true
Error in Browser
{"errors":[{"message":"An unexpected error occurred.","extensions":{"code":"INTERNAL_SERVER_ERROR"}}]}
Error in Console
.env
Dockerfile
docker-compose.yml
Directus Version
10.10.7
Hosting Strategy
Self-Hosted (Docker Image)
The text was updated successfully, but these errors were encountered: