[MGNLIMG-286] Can't find ImageWriter for webp Created: 09/Mar/23  Updated: 14/Apr/23  Resolved: 14/Apr/23

Status: Closed
Project: Imaging
Component/s: None
Affects Version/s: 3.5.6
Fix Version/s: 4.0.0, 3.5.8

Type: Bug Priority: Neutral
Reporter: Viet Nguyen Assignee: Oanh Thai Hoang
Resolution: Fixed Votes: 1
Labels: None
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: 2d 0.5h Time Spent: 2d 0.5h
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Attachments: JPEG File aaron.anderson-40hsf.com_WEB.jpeg     Text File error.log    
Issue Links:
Relates
relates to MGNLIMG-293 Inform user if uploaded image is not ... Accepted
causality
documentation
to be documented by MGNLIMG-298 DOC: Only the RGB image type is suppo... Closed
Sub-Tasks:
Key
Summary
Type
Status
Assignee
MGNLIMG-303 Implement Sub-task Closed Oanh Thai Hoang  
MGNLIMG-304 Review Sub-task Completed Dai Ha  
MGNLIMG-305 piQA Sub-task Completed Dai Ha  
MGNLIMG-306 QA Sub-task Completed Chuong Doan Huy  
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Epic Link: Support
Sprint: DevX 35
Story Points: 2
Team: DeveloperX
Work Started:
Approved:
Yes

 Description   

Steps to reproduce

  1.  Configure any theme's image variation operation to generate webp image from attached source. Please note that this issue only happen to this kind of image, not happen to all image types. aaron.anderson-40hsf.com_WEB.jpeg
  2.  Below is example configuration when we change the "travel-demo-theme.yaml":
    imaging:
      class: info.magnolia.templating.imaging.VariationAwareImagingSupport
      variations:
        "1600":
          class: info.magnolia.templating.imaging.variation.SimpleResizeVariation
          width: 1600
        "1366-2":
          class: info.magnolia.templating.imaging.variation.SimpleResizeVariation
          width: 1366
        ### configure webp image generator here
        "1366":
          class: info.magnolia.templating.imaging.variation.ImageOperationProvidingVariation
          imageOperation:
            class: info.magnolia.imaging.operations.ImageOperationChain
            outputFormat:
              formatName: webp
            parameterProviderFactory:
              class: info.magnolia.imaging.parameters.BinaryNodeParameterProviderFactory
            operations:
              load:
                class: info.magnolia.imaging.operations.load.FromBinaryNode
              resize:
                class: info.magnolia.imaging.operations.cropresize.BoundedResize
                maxWidth: 948
                maxHeight: 948
    ...
    
  3. Upload image to Asset app
  4. Access its variant with proper link such as:
    http://host:port/contextPath/.imaging/mte/travel-demo-theme/1366/dam/folder/aaron.anderson-40hsf.com_WEB.jpg/jcr:content/aaron.anderson-40hsf.com_WEB.webp
    

.. Logs, screenshots, gifs...

Expected results

  • System generate a correct webp image

.. Justify non-trivial expectations with a link to a doc or a relevant discussion.

Actual results

  • Error happen and no webp image could be generated (see error log here error.log )

Workaround

  • Do not use webp image format, change to "jpg" or other outputFormat which work.

Development notes



 Comments   
Comment by Oanh Thai Hoang [ 03/Apr/23 ]

Here is output  of discovery. cc czimmermann , jsimak :

 

  • Firstly, from spec of WebP specification format supports only (A)RGB type. Ex RGB color model img
  • Secondly, third party webp-imageio it's also check if image is RGB type or not. So webp-imageio can not encode image is not RGB type. Unfortunately, there are no java webp-imageIo can support non RGB now
  • Thirdly, the attached ticket image model is not RGB (it's is GRAY type color model with grayscale space color) so it won't be support for now.

Suggestion: we can add another log to say we don't support generate webp from img is not RGB type and user should convert it before uploading and create another docu ticket for the limitation

 

Thank you

 

Comment by Christopher Zimmermann [ 03/Apr/23 ]

OK - thank you for the summary.

Suggestion sounds good. Including updating documentation.

Comment by Christopher Zimmermann [ 04/Apr/23 ]

Created followup ticket to inform user when they upload incompatible image.

https://jira.magnolia-cms.com/browse/MGNLIMG-293

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