There are 2 comments.
 
 
XWiki Platform / cid:jira-generated-image-avatar-a04da8c4-8c92-42a7-9d97-dbd91746498b XWIKI-21546 Open

WARN c.x.x.p.i.ImagePlugin Failed to transform image attachment. javax.imageio.IIOException: Unsupported Image Type

 
View issue   ยท   Add comment
 

2 comments

 
cid:jira-generated-image-avatar-3b2f94f5-6340-47eb-9a4c-95e61b8784b3 Vincent Massol on 05/Dec/24 13:48
 

Tested:

  • XWiki 15.10.15: Can reproduce with Java 11 & 17, on LO 24.2.7 (latest LTS)
  • XWiki 16.9.0: There's a different warning message:
    2024-12-05 13:31:56,089 [qtp1411892748-114 - http://localhost:8080/xwiki/bin/download/test/WebHome/009-%5BFREE%5DEnglish-Images-Tables-21Pages-DOCX_cc1fdd73.jpg?width=48&rev=1.1] WARN  c.x.x.p.i.ImagePlugin          - Failed to transform image attachment 009-[FREE]English-Images-Tables-21Pages-DOCX_cc1fdd73.jpg for scaling, falling back to original attachment. 
    2024-12-05 13:31:56,092 [qtp1411892748-25 - http://localhost:8080/xwiki/bin/download/test/WebHome/009-%5BFREE%5DEnglish-Images-Tables-21Pages-DOCX_3128f1c6.jpg?width=48&rev=1.1] WARN  c.x.x.p.i.ImagePlugin          - Failed to transform image attachment 009-[FREE]English-Images-Tables-21Pages-DOCX_3128f1c6.jpg for scaling, falling back to original attachment. 
    

After improving the warning message, I can see that the cause is still the same:

2024-12-05 13:42:14,780 [qtp22805895-21 - http://localhost:8080/xwiki/bin/download/test/WebHome/009-%5BFREE%5DEnglish-Images-Tables-21Pages-DOCX_cc1fdd73.jpg?width=500&height=185&rev=1.1] WARN  c.x.x.p.i.ImagePlugin          - Failed to transform image attachment [009-[FREE]English-Images-Tables-21Pages-DOCX_cc1fdd73.jpg] for scaling, falling back to original attachment. Root error: [IIOException: Unsupported Image Type] 
2024-12-05 13:42:14,790 [qtp22805895-118 - http://localhost:8080/xwiki/bin/download/test/WebHome/009-%5BFREE%5DEnglish-Images-Tables-21Pages-DOCX_3128f1c6.jpg?width=540&height=570&rev=1.1] WARN  c.x.x.p.i.ImagePlugin          - Failed to transform image attachment [009-[FREE]English-Images-Tables-21Pages-DOCX_3128f1c6.jpg] for scaling, falling back to original attachment. Root error: [IIOException: Unsupported Image Type] 

I'm now working to try to fix it by using https://stackoverflow.com/a/64392386

 
cid:jira-generated-image-avatar-3b2f94f5-6340-47eb-9a4c-95e61b8784b3 Vincent Massol on 05/Dec/24 13:49
 
Tested:
* XWiki 15.10.15: Can reproduce with Java 11 & 17, on LO 24.2.7 (latest LTS)
* XWiki 16.9.0: There's a different warning message: {noformat}
2024-12-05 13:31:56,089 [qtp1411892748-114 - http://localhost:8080/xwiki/bin/download/test/WebHome/009-%5BFREE%5DEnglish-Images-Tables-21Pages-DOCX_cc1fdd73.jpg?width=48&rev=1.1] WARN  c.x.x.p.i.ImagePlugin          - Failed to transform image attachment 009-[FREE]English-Images-Tables-21Pages-DOCX_cc1fdd73.jpg for scaling, falling back to original attachment.
2024-12-05 13:31:56,092 [qtp1411892748-25 - http://localhost:8080/xwiki/bin/download/test/WebHome/009-%5BFREE%5DEnglish-Images-Tables-21Pages-DOCX_3128f1c6.jpg?width=48&rev=1.1] WARN  c.x.x.p.i.ImagePlugin          - Failed to transform image attachment 009-[FREE]English-Images-Tables-21Pages-DOCX_3128f1c6.jpg for scaling, falling back to original attachment.
{noformat}

After improving the warning message, I can see that the cause is still the same:

{noformat}
2024-12-05 13:42:14,780 [qtp22805895-21 - http://localhost:8080/xwiki/bin/download/test/WebHome/009-%5BFREE%5DEnglish-Images-Tables-21Pages-DOCX_cc1fdd73.jpg?width=500&height=185&rev=1.1] WARN  c.x.x.p.i.ImagePlugin          - Failed to transform image attachment [009-[FREE]English-Images-Tables-21Pages-DOCX_cc1fdd73.jpg] for scaling, falling back to original attachment. Root error: [IIOException: Unsupported Image Type]
2024-12-05 13:42:14,790 [qtp22805895-118 - http://localhost:8080/xwiki/bin/download/test/WebHome/009-%5BFREE%5DEnglish-Images-Tables-21Pages-DOCX_3128f1c6.jpg?width=540&height=570&rev=1.1] WARN  c.x.x.p.i.ImagePlugin          - Failed to transform image attachment [009-[FREE]English-Images-Tables-21Pages-DOCX_3128f1c6.jpg] for scaling, falling back to original attachment. Root error: [IIOException: Unsupported Image Type]
{noformat}

I'm now working to try to fix it by using https://stackoverflow.com/a/64392386


Note that the warning is not about the office import but just about the server-side scaling of the image when displaying.