You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to render `.webp` images in DOCX files using Telerik WordsProcessing. The current implementation fails to process `.webp` format images when importing HTML content and exporting the output.
21
-
22
-
This knowledge base article also answers the following questions:
23
-
- How to convert `.webp` images to supported formats in Telerik WordsProcessing?
24
-
- How to handle unsupported image formats in DOCX export using Telerik WordsProcessing?
25
-
- How to process `.webp` images when importing HTML content in Telerik WordsProcessing?
20
+
The current implementation of Telerik Document Processing libraries is not intended to process `.webp` format images when importing HTML content and exporting the output using [RadWordsProcessing]({%slug radwordsprocessing-overview%}). This article shows how to convert `.webp` images to the [supported formats]({%slug radwordsprocessing-model-imageinline%}) like PNG in Telerik WordsProcessing.
26
21
27
22
## Solution
28
23
29
-
Telerik WordsProcessing does not support the `.webp` format directly. The supported image formats are listed in the [Supported Image Extensions](https://docs.telerik.com/devtools/document-processing/libraries/radwordsprocessing/model/imageinline#supported-image-extensions). To handle `.webp` images, convert them to a supported format like `.png`. Follow the steps below:
24
+
To handle `.webp` images, convert them to a supported format like `.png`. Follow the steps below:
30
25
31
26
1. Install the `SixLabors.ImageSharp` NuGet package for image conversion.
32
27
33
-
2. Import the HTML content using `HtmlFormatProvider`.
28
+
2. Import the HTML content using [HtmlFormatProvider]({%slug radwordsprocessing-formats-and-conversion-html-htmlformatprovider%}).
34
29
35
30
3. Iterate through the images in the document and convert `.webp` images to `.png` format.
36
31
37
32
4. Replace the `.webp` image sources with the converted `.png` sources.
38
33
39
-
5. Export the document to DOCX.
34
+
5. Export the document to [DOCX]({%slug radwordsprocessing-formats-and-conversion-docx-docxformatprovider%}).
-[WordsProcessing: Introduce support for importing webp images](https://feedback.telerik.com/document-processing/1543913-wordsprocessing-introduce-support-for-importing-webp-images)
0 commit comments