[MGNLIMG-281] WebP images/renditions broken on ARM/Apple M1 Created: 06/Jan/23  Updated: 06/Jan/23

Status: Open
Project: Imaging
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Daniel Schneeberger Assignee: Unassigned
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File webPException.png    
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled

 Description   

Steps to reproduce

  1. Bring up Magnolia on a Mac with M1 CPU ( e.g. MacBook Air M1 )
  2. To your custom magnolia theme "mytheme", add WebP imaging variation 'my-rendition-webp' (see json below)
  3. Upload an image asset to Assets app ( -> /path/to/myImage.jpg )
  4. Try to show the image in your Browser <magnolia-server>/.imaging/mte/mytheme/my-rendition-webp/dam/path/to/myImage.jpg/jcr:content/myImage.jpg

Expected results

The "myImage" image shows delivered in expected 700*840 rendition in WebP format

Actual results

No image show but redirected to error page (Note: on a Notebook with x86_64 CPU everything works fine, image is delivered in WebP format)

Workaround

No workaround ( not using webp is not really an option, firing all developers with M1 Macs neighter )

Development notes

WebP imaging variation:

imaging:
  variations:
    my-rendition-webp: !include:/ekzweb/theme-fragments/webp-variation.yaml
      class: info.magnolia.templating.imaging.variation.ImageOperationProvidingVariation
      imageOperation:
        class: info.magnolia.imaging.operations.ImageOperationChain
        outputFormat:
          quality: 80
          formatName: webp
        operations:
          load:
            class: info.magnolia.imaging.operations.load.FromBinaryNode
          resize:
            class: info.magnolia.imaging.operations.cropresize.AutoCropAndResize
            crop: true
            targetWidth: 700
            targetHeight: 840

Exception in info.magnolia.imaging.DefaultImageStreamer (Note that the exception does not end up in Magnolia Logs, something you probably want to fix as well):

Pointers showing that WebP rendering does Native Java:

https://github.com/nintha/webp-imageio-core/blob/master/src/main/java/com/luciad/imageio/webp/WebPEncoderOptions.java


Generated at Mon Feb 12 02:14:01 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.