public class SkipImagesStrategy extends Object implements IImageExportStrategy
This strategy is useful when you want to convert a document to Markdown without saving the actual image files.
When this strategy is used, the output Markdown will still contain image references
(e.g., ), but the actual image files will not be saved to disk.
Example:
ConvertOptions options = new ConvertOptions();
options.setImageExportStrategy(new SkipImagesStrategy());
String markdown = MarkdownConverter.toMarkdown("document.docx", options);
// Image references remain in the markdown but no files are written
| Constructor and Description |
|---|
SkipImagesStrategy() |
| Modifier and Type | Method and Description |
|---|---|
String |
getImagesFolder()
Returns an empty string since this strategy does not use an images folder.
|
OutputStream |
getImageStream(ImageExportContext context)
Returns null to indicate that the image should be skipped.
|
public String getImagesFolder()
getImagesFolder in interface IImageExportStrategypublic OutputStream getImageStream(ImageExportContext context)
getImageStream in interface IImageExportStrategycontext - The image export context containing the default image file name and other metadata.
You may modify imageFileName before returning the stream to change the file name
that appears in the Markdown output.null to use the default behaviorCopyright © 2026. All rights reserved.