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

Support heic/heif attachments as photos #2972

Merged
merged 1 commit into from
Sep 20, 2022
Merged

Conversation

julien-nc
Copy link
Member

This small change is actually enough to support HEIC/HEIF files as image attachments.

This requires to have ImageMagic and the php-imagick module installed and the relevant preview providers enabled.
To enable the providers, one would need to have that in config.php:

'enabledPreviewProviders' =>
  array (
        1 => 'OC\\Preview\\HEIF',
        2 => 'OC\\Preview\\HEIC',
  ),

If the providers are not enabled, heic/heif files are considered as media attachment.

…allback to media if previewManager does not support them

Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
@mejo-
Copy link
Member

mejo- commented Sep 20, 2022

Wouldn't the mimetypes also need to be added to src/helpers/mime.js?

@julien-nc
Copy link
Member Author

Wouldn't the mimetypes also need to be added to src/helpers/mime.js?

Thanks for the fast review.
Actually no because we don't really display heic/heif files but jpeg previews of'em.

@mejo-
Copy link
Member

mejo- commented Sep 20, 2022

Ah, makes sense. Thanks for the explanation 👍

@mejo- mejo- merged commit 2882cfc into master Sep 20, 2022
@delete-merged-branch delete-merged-branch bot deleted the enh/noid/support-heic-heif branch September 20, 2022 14:42
@blizzz blizzz mentioned this pull request Sep 22, 2022
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants