Pārlūkot izejas kodu

fix(asset-server-plugin): Change image format with no other transforms (#2104)

jacobfrantz1 2 gadi atpakaļ
vecāks
revīzija
6cf1608d75
1 mainītis faili ar 2 papildinājumiem un 0 dzēšanām
  1. 2 0
      packages/asset-server-plugin/src/plugin.ts

+ 2 - 0
packages/asset-server-plugin/src/plugin.ts

@@ -318,6 +318,8 @@ export class AssetServerPlugin implements NestModule, OnApplicationBootstrap {
             if (this.presets && !!this.presets.find(p => p.name === preset)) {
             if (this.presets && !!this.presets.find(p => p.name === preset)) {
                 imageParamHash = this.md5(`_transform_pre_${preset}${focalPoint}${imageFormat}`);
                 imageParamHash = this.md5(`_transform_pre_${preset}${focalPoint}${imageFormat}`);
             }
             }
+        } else if (imageFormat) {
+            imageParamHash = this.md5(`_transform_${imageFormat}`);
         }
         }
 
 
         const decodedReqPath = decodeURIComponent(req.path);
         const decodedReqPath = decodeURIComponent(req.path);