diff --git a/src/plugins/fixImagesQuality/index.ts b/src/plugins/fixImagesQuality/index.ts index d94c8e3b..4acd9a92 100644 --- a/src/plugins/fixImagesQuality/index.ts +++ b/src/plugins/fixImagesQuality/index.ts @@ -14,10 +14,12 @@ export default definePlugin({ patches: [ { find: "handleImageLoad=", - replacement: { - match: /(?<=getSrc\(\i\){.+?format:)\i/, - replace: "null" - } + replacement: [ + { + match: /(?<=getSrc\(\i\){.+?return )\i\.SUPPORTS_WEBP.+?:(?=\i&&\(\i="png"\))/, + replace: "" + } + ] } ] });