refactor: migrate ImageOptimizer.ts to use vault.adapter
- Replace fs.unlink/rename with vault.adapter methods when plugin available - Replace path.join with PathUtils.joinPath for vault paths - Add plugin parameter to optimizeImage method for vault.adapter access - Keep path module for external tool operations - Add fs fallbacks for temp file operations when plugin unavailable - Use readBinary/writeBinary pattern for image file moves - Update PdfToImageConverter.ts to pass plugin to ImageOptimizer - Maintain dual approach for vault and external temp file handling
This commit is contained in:
2 files changed
+35
-7
No files matched your search
@@ -143,7 +143,8 @@ export class PdfToImageConverter {
|
||||
{
|
||||
format: opts.format,
|
||||
quality: opts.quality
|
||||
}
|
||||
},
|
||||
this.plugin
|
||||
);
|
||||
|
||||
if (!optimizationResult.success) {
|
||||
|
||||
Reference in new issue
Block a user