Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tif image conversion #16068

Closed
HemboPagi opened this issue Oct 20, 2022 · 6 comments · Fixed by #18012
Closed

tif image conversion #16068

HemboPagi opened this issue Oct 20, 2022 · 6 comments · Fixed by #18012
Assignees
Labels

Comments

@HemboPagi
Copy link

Describe the Bug

TIF images are rendered as black in Directus App File Browser.

Screenshot 2022-10-20 at 07 24 37

Here are the request made by Directus:
https://db.dl.tlu.ee/assets/a0928c43-315e-4631-be4c-f61ffa0f0c1d?key=system-medium-cover&modified=2022-10-20T04:21:12.000Z&download=true
https://db.dl.tlu.ee/assets/c0d2ac87-e167-45e0-a682-e69cb318a9d0?key=system-medium-cover&modified=2022-10-20T04:21:14.000Z&download=true

Same image can be dispayed using the trasformation setup i have created for thumnails:
https://db.dl.tlu.ee/assets/a0928c43-315e-4631-be4c-f61ffa0f0c1d?key=thumbnail
https://db.dl.tlu.ee/assets/c0d2ac87-e167-45e0-a682-e69cb318a9d0?key=thumbnail

I have followed instructios (#16046) and set the ASSETS_TRANSFORM_IMAGE_MAX_DIMENSION to 11000. Also checked the mime types.

To Reproduce

Upload TIF image via Directus App File Browser.
You will see black thumbnail instead of the image.
Test images i used:
Medium size - https://www.icloud.com/iclouddrive/0de-79pzgV2rPBQm3rk1BcRAQ#medium_10084x8146
Small size - https://www.icloud.com/iclouddrive/061osRRDOYaI4vyfDrMKB11Tw#small_4000x3231

Errors Shown

Tested with the lates Brave browser (Version 1.44.112 Chromium: 106.0.5249.119 (x86_64)), and Safari (Version 16.0 (16614.1.25.9.10, 16614)). No other errors except in Safari "Refused to execute a script because its hash, its nonce, or 'unsafe-inline' does not appear in the script-src directive of the Content Security Policy."

What version of Directus are you using?

9.18.1

What version of Node.js are you using?

14.18.2

What database are you using?

Maria DB

What browser are you using?

Brave browser (Version 1.44.112 Chromium: 106.0.5249.119 (x86_64)), and Safari (Version 16.0 (16614.1.25.9.10, 16614))

How are you deploying Directus?

Directus runs at Uni server, set up manually

@br41nslug
Copy link
Member

Important to note here is that neither Chrome or Firefox support TIFF format images (one would assume neither does Brave as it is a chrome based browser). Testing here should be limited to Safari.

@HemboPagi
Copy link
Author

My assumption was that when uploading tiff to with Directus app it converts in to something all browsers can handle. In my app what uses the date i provide access to tiff as a link but preview will be jpeg or webp

@br41nslug
Copy link
Member

It can do that using the format option but this is not done by default for the previews in the app.

@rijkvanzanten
Copy link
Member

It can do that using the format option but this is not done by default for the previews in the app.

Would be kinda nice to implement #15918 and set format=auto by default on the system presets. That way, the browser is in charge of choosing the most optimized version of the preview image 🙂

@HemboPagi
Copy link
Author

hello, any progress with that?

@rijkvanzanten
Copy link
Member

Linear: ENG-157

@Nitwel Nitwel self-assigned this Mar 31, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants