diff --git a/src/plugins/_api/dynamicImageModalApi.ts b/src/plugins/_api/dynamicImageModalApi.ts index 4d74cff24..759ef001b 100644 --- a/src/plugins/_api/dynamicImageModalApi.ts +++ b/src/plugins/_api/dynamicImageModalApi.ts @@ -14,11 +14,18 @@ export default definePlugin({ description: "Allows you to omit either width or height when opening an image modal", patches: [ { - find: "SCALE_DOWN:", + find: ".contain,SCALE_DOWN:", replacement: { match: /(?<="IMAGE"===\i\?)\i(?=\?)/, replace: "true" } + }, + { + find: ".dimensionlessImage,", + replacement: { + match: /(?<="IMAGE"===\i&&\(\i=)\i(?=\?)/, + replace: "true" + } } ] });