Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Nextcloud
  3. Nextcloud: heic / heif previews not working

Nextcloud: heic / heif previews not working

Scheduled Pinned Locked Moved Nextcloud
7 Posts 3 Posters 3.4k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • necrevistonnezrN Offline
    necrevistonnezrN Offline
    necrevistonnezr
    wrote on last edited by
    #1

    Has anybody gotten heic / heif previews working on Nextcloud (both web and iOS App)?

    They don't work for me. I have this in my app/data/config/config.php:

      'enable_previews' => true,
      'enabledPreviewProviders' => 
      array (
        0 => 'OC\\Preview\\TXT',
        1 => 'OC\\Preview\\MarkDown',
        2 => 'OC\\Preview\\OpenDocument',
        3 => 'OC\\Preview\\PDF',
        4 => 'OC\\Preview\\MSOffice2003',
        5 => 'OC\\Preview\\MSOfficeDoc',
        6 => 'OC\\Preview\\PDF',
        7 => 'OC\\Preview\\Image',
        8 => 'OC\\Preview\\Photoshop',
        9 => 'OC\\Preview\\TIFF',
        10 => 'OC\\Preview\\SVG',
        11 => 'OC\\Preview\\Font',
        12 => 'OC\\Preview\\MP3',
        13 => 'OC\\Preview\\Movie',
        14 => 'OC\\Preview\\MKV',
        15 => 'OC\\Preview\\MP4',
        16 => 'OC\\Preview\\HEIF',
        17 => 'OC\\Preview\\HEIC',
      ),
    

    There's conflicting information whether one still needs to install imagemagick or not, see https://help.nextcloud.com/t/heic-mov-previews/62973/12

    Running php -r 'phpinfo();' | grep HEIC in the App terminal yields no results.

    1 Reply Last reply
    0
    • girishG Offline
      girishG Offline
      girish
      Staff
      wrote on last edited by
      #2

      I think this is same as an issue reported in lychee - https://forum.cloudron.io/topic/4439/heic-photos-unsupported . From what I had investigated before, only the very latest imagemagick has HEIC support and we have to compile it from source to make it work.

      necrevistonnezrN 1 Reply Last reply
      1
      • girishG girish

        I think this is same as an issue reported in lychee - https://forum.cloudron.io/topic/4439/heic-photos-unsupported . From what I had investigated before, only the very latest imagemagick has HEIC support and we have to compile it from source to make it work.

        necrevistonnezrN Offline
        necrevistonnezrN Offline
        necrevistonnezr
        wrote on last edited by
        #3

        @girish said in Nextcloud: heic / heif previews not working:

        From what I had investigated before, only the very latest imagemagick has HEIC support and we have to compile it from source to make it work.

        Is that something already in your pipeline or should I request it?

        girishG 1 Reply Last reply
        1
        • necrevistonnezrN necrevistonnezr

          @girish said in Nextcloud: heic / heif previews not working:

          From what I had investigated before, only the very latest imagemagick has HEIC support and we have to compile it from source to make it work.

          Is that something already in your pipeline or should I request it?

          girishG Offline
          girishG Offline
          girish
          Staff
          wrote on last edited by
          #4

          @necrevistonnezr I have created https://git.cloudron.io/cloudron/nextcloud-app/-/issues/83

          necrevistonnezrN 1 Reply Last reply
          1
          • girishG girish

            @necrevistonnezr I have created https://git.cloudron.io/cloudron/nextcloud-app/-/issues/83

            necrevistonnezrN Offline
            necrevistonnezrN Offline
            necrevistonnezr
            wrote on last edited by necrevistonnezr
            #5

            @girish said in Nextcloud: heic / heif previews not working:

            @necrevistonnezr I have created https://git.cloudron.io/cloudron/nextcloud-app/-/issues/83

            Thanks! There's a tutorial here https://eplt.medium.com/5-minutes-to-install-imagemagick-with-heic-support-on-ubuntu-18-04-digitalocean-fe2d09dcef1

            1 Reply Last reply
            0
            • necrevistonnezrN Offline
              necrevistonnezrN Offline
              necrevistonnezr
              wrote on last edited by
              #6

              Is there progress on including a "working" imagemagick in the Nextcloud package?
              When using the preview generator, I noticed that I can't generate previews for anything (PDF, TIF, heic) but JPG...
              I get errors like this:

              2021-11-30T15:38:51+00:00 Generating previews for /USERNAME/files/Rezepte/Salat.pdf
              Error: /limitcheck in /----nostringval----
              Operand stack:
              
              Execution stack:
                 %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1990   1   3   %oparray_pop   1989   1   3   %oparray_pop   1977   1   3   %oparray_pop   1833   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push
              Dictionary stack:
                 --dict:737/1123(ro)(G)--   --dict:0/20(G)--   --dict:75/200(L)--
              Current allocation mode is local
              GPL Ghostscript 9.50: Unrecoverable error, exit code 1
              {"reqId":"0X6motfmXSuxgI5TOe0G","level":3,"time":"2021-11-30T15:38:51+00:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":"File: /USERNAME/files/Rezepte/Salat.pdf Imagick says:","userAgent":"--","version":"22.2.3.0","exception":{"Exception":"ImagickException","Message":"FailedToExecuteCommand `'gs' -sstdout=%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 '-sDEVICE=pngalpha' -dTextAlphaBits=4 -dGraphicsAlphaBits=4 '-r72x72' -dFirstPage=1 -dLastPage=1 '-sOutputFile=/tmp/magick-111364-UluFgnG4k%d' '-f/tmp/magick-1113eOHjVWLlSL3n' '-f/tmp/magick-1113oHVWEVNHXeOl'' (1) @ error/pdf.c/InvokePDFDelegate/291","Code":415,"Trace":[{"file":"/app/code/lib/private/Preview/Bitmap.php","line":86,"function":"readimage","class":"Imagick","type":"->"},{"file":"/app/code/lib/private/Preview/Bitmap.php","line":49,"function":"getResizedPreview","class":"OC\\Preview\\Bitmap","type":"->"},{"file":"/app/code/lib/private/Preview/GeneratorHelper.php","line":62,"function":"getThumbnail","class":"OC\\Preview\\Bitmap","type":"->"},{"file":"/app/code/lib/private/Preview/Generator.php","line":245,"function":"getThumbnail","class":"OC\\Preview\\GeneratorHelper","type":"->"},{"file":"/app/code/lib/private/Preview/Generator.php","line":140,"function":"getMaxPreview","class":"OC\\Preview\\Generator","type":"->"},{"file":"/app/code/lib/private/PreviewManager.php","line":204,"function":"generatePreviews","class":"OC\\Preview\\Generator","type":"->"},{"file":"/app/data/apps/previewgenerator/lib/Command/Generate.php","line":203,"function":"generatePreviews","class":"OC\\PreviewManager","type":"->"},{"file":"/app/data/apps/previewgenerator/lib/Command/Generate.php","line":174,"function":"parseFile","class":"OCA\\PreviewGenerator\\Command\\Generate","type":"->"},{"file":"/app/data/apps/previewgenerator/lib/Command/Generate.php","line":172,"function":"parseFolder","class":"OCA\\PreviewGenerator\\Command\\Generate","type":"->"},{"file":"/app/data/apps/previewgenerator/lib/Command/Generate.php","line":155,"function":"parseFolder","class":"OCA\\PreviewGenerator\\Command\\Generate","type":"->"},{"file":"/app/data/apps/previewgenerator/lib/Command/Generate.php","line":123,"function":"generateUserPreviews","class":"OCA\\PreviewGenerator\\Command\\Generate","type":"->"},{"file":"/app/code/lib/private/User/Manager.php","line":646,"function":"OCA\\PreviewGenerator\\Command\\{closure}","class":"OCA\\PreviewGenerator\\Command\\Generate","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/app/data/apps/previewgenerator/lib/Command/Generate.php","line":124,"function":"callForSeenUsers","class":"OC\\User\\Manager","type":"->"},{"file":"/app/code/3rdparty/symfony/console/Command/Command.php","line":255,"function":"execute","class":"OCA\\PreviewGenerator\\Command\\Generate","type":"->"},{"file":"/app/code/3rdparty/symfony/console/Application.php","line":1009,"function":"run","class":"Symfony\\Component\\Console\\Command\\Command","type":"->"},{"file":"/app/code/3rdparty/symfony/console/Application.php","line":273,"function":"doRunCommand","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/app/code/3rdparty/symfony/console/Application.php","line":149,"function":"doRun","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/app/code/lib/private/Console/Application.php","line":209,"function":"run","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/app/code/console.php","line":99,"function":"run","class":"OC\\Console\\Application","type":"->"},{"file":"/app/code/occ","line":11,"args":["/app/code/console.php"],"function":"require_once"}],"File":"/app/code/lib/private/Preview/Bitmap.php","Line":86,"CustomMessage":"File: /USERNAME/files/Rezepte/Salat.pdf Imagick says:"}}
              
              nebulonN 1 Reply Last reply
              0
              • necrevistonnezrN necrevistonnezr

                Is there progress on including a "working" imagemagick in the Nextcloud package?
                When using the preview generator, I noticed that I can't generate previews for anything (PDF, TIF, heic) but JPG...
                I get errors like this:

                2021-11-30T15:38:51+00:00 Generating previews for /USERNAME/files/Rezepte/Salat.pdf
                Error: /limitcheck in /----nostringval----
                Operand stack:
                
                Execution stack:
                   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1990   1   3   %oparray_pop   1989   1   3   %oparray_pop   1977   1   3   %oparray_pop   1833   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push
                Dictionary stack:
                   --dict:737/1123(ro)(G)--   --dict:0/20(G)--   --dict:75/200(L)--
                Current allocation mode is local
                GPL Ghostscript 9.50: Unrecoverable error, exit code 1
                {"reqId":"0X6motfmXSuxgI5TOe0G","level":3,"time":"2021-11-30T15:38:51+00:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":"File: /USERNAME/files/Rezepte/Salat.pdf Imagick says:","userAgent":"--","version":"22.2.3.0","exception":{"Exception":"ImagickException","Message":"FailedToExecuteCommand `'gs' -sstdout=%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 '-sDEVICE=pngalpha' -dTextAlphaBits=4 -dGraphicsAlphaBits=4 '-r72x72' -dFirstPage=1 -dLastPage=1 '-sOutputFile=/tmp/magick-111364-UluFgnG4k%d' '-f/tmp/magick-1113eOHjVWLlSL3n' '-f/tmp/magick-1113oHVWEVNHXeOl'' (1) @ error/pdf.c/InvokePDFDelegate/291","Code":415,"Trace":[{"file":"/app/code/lib/private/Preview/Bitmap.php","line":86,"function":"readimage","class":"Imagick","type":"->"},{"file":"/app/code/lib/private/Preview/Bitmap.php","line":49,"function":"getResizedPreview","class":"OC\\Preview\\Bitmap","type":"->"},{"file":"/app/code/lib/private/Preview/GeneratorHelper.php","line":62,"function":"getThumbnail","class":"OC\\Preview\\Bitmap","type":"->"},{"file":"/app/code/lib/private/Preview/Generator.php","line":245,"function":"getThumbnail","class":"OC\\Preview\\GeneratorHelper","type":"->"},{"file":"/app/code/lib/private/Preview/Generator.php","line":140,"function":"getMaxPreview","class":"OC\\Preview\\Generator","type":"->"},{"file":"/app/code/lib/private/PreviewManager.php","line":204,"function":"generatePreviews","class":"OC\\Preview\\Generator","type":"->"},{"file":"/app/data/apps/previewgenerator/lib/Command/Generate.php","line":203,"function":"generatePreviews","class":"OC\\PreviewManager","type":"->"},{"file":"/app/data/apps/previewgenerator/lib/Command/Generate.php","line":174,"function":"parseFile","class":"OCA\\PreviewGenerator\\Command\\Generate","type":"->"},{"file":"/app/data/apps/previewgenerator/lib/Command/Generate.php","line":172,"function":"parseFolder","class":"OCA\\PreviewGenerator\\Command\\Generate","type":"->"},{"file":"/app/data/apps/previewgenerator/lib/Command/Generate.php","line":155,"function":"parseFolder","class":"OCA\\PreviewGenerator\\Command\\Generate","type":"->"},{"file":"/app/data/apps/previewgenerator/lib/Command/Generate.php","line":123,"function":"generateUserPreviews","class":"OCA\\PreviewGenerator\\Command\\Generate","type":"->"},{"file":"/app/code/lib/private/User/Manager.php","line":646,"function":"OCA\\PreviewGenerator\\Command\\{closure}","class":"OCA\\PreviewGenerator\\Command\\Generate","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/app/data/apps/previewgenerator/lib/Command/Generate.php","line":124,"function":"callForSeenUsers","class":"OC\\User\\Manager","type":"->"},{"file":"/app/code/3rdparty/symfony/console/Command/Command.php","line":255,"function":"execute","class":"OCA\\PreviewGenerator\\Command\\Generate","type":"->"},{"file":"/app/code/3rdparty/symfony/console/Application.php","line":1009,"function":"run","class":"Symfony\\Component\\Console\\Command\\Command","type":"->"},{"file":"/app/code/3rdparty/symfony/console/Application.php","line":273,"function":"doRunCommand","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/app/code/3rdparty/symfony/console/Application.php","line":149,"function":"doRun","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/app/code/lib/private/Console/Application.php","line":209,"function":"run","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/app/code/console.php","line":99,"function":"run","class":"OC\\Console\\Application","type":"->"},{"file":"/app/code/occ","line":11,"args":["/app/code/console.php"],"function":"require_once"}],"File":"/app/code/lib/private/Preview/Bitmap.php","Line":86,"CustomMessage":"File: /USERNAME/files/Rezepte/Salat.pdf Imagick says:"}}
                
                nebulonN Offline
                nebulonN Offline
                nebulon
                Staff
                wrote on last edited by
                #7

                @necrevistonnezr with your changes to the config.php proposed initially I can actually see pdf previews generated fine. For HEIC I think this is a general Ubuntu issue, many apps currently face. We have to further investigate there first.

                I do wonder though if you preview generator config file adjustments and also the preview plugin should be part of the app package. Not sure how stable this Nextcloud plugin is though. Anyone have more experience here with it?

                1 Reply Last reply
                0
                • jamesJ james marked this topic as a regular topic
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Bookmarks
                • Search