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
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.
20
+
The current implementation of the [RadWordsProcessing]({%slug radwordsprocessing-overview%}) library cannot handle `WEBP` images when exporting Word documents. This article shows how to convert `WEBP` images to any of the already [supported formats]({%slug radwordsprocessing-model-imageinline%}) (like PNG), so they can be exported successfully.
21
21
22
22
## Solution
23
23
24
-
To handle `.webp` images, convert them to a supported format like `.png`. Follow the steps below:
24
+
This solution uses an HTML document as an example. To handle its `WEBP` images by converting them to a supported format like `PNG`, follow the steps below:
25
25
26
26
1. Install the `SixLabors.ImageSharp` NuGet package for image conversion.
27
27
28
28
2. Import the HTML content using [HtmlFormatProvider]({%slug radwordsprocessing-formats-and-conversion-html-htmlformatprovider%}).
29
29
30
-
3. Iterate through the images in the document and convert `.webp` images to `.png` format.
30
+
3. Iterate through the images in the document and convert the `WEBP` images to `PNG`.
31
31
32
-
4. Replace the `.webp` image sources with the converted `.png` sources.
32
+
4. Replace the `WEBP` image sources with the converted `PNG` sources.
33
33
34
34
5. Export the document to [DOCX]({%slug radwordsprocessing-formats-and-conversion-docx-docxformatprovider%}).
0 commit comments