[Solved] ImageIO.read(inputStream) Read .webp Format Image Error

1. Problem description

A new bug was raised in the test today. The reason is that the test uploaded one Image in webp format
When running the code to javax.imageio.ImageIO.read(inputStream) . Null is returned.

2. Solutions

You only need to add the following dependencies without moving the code

<dependency>
    <groupId>org.sejda.imageio</groupId>
    <artifactId>webp-imageio</artifactId>
    <version>0.1.6</version>
</dependency>

Run again, solve the problem.

Read More: