ImageKit operation for aspectRatio (`ar`) url-encodes value twice. Input: ```javascript { imagekit: { ar: '9-16' } } ``` Output: `https://ik.imagekit.io/image.png?updatedAt=1778956861259&tr=ar-9%252D16%2Cfo-custom%2Cw-640%2Cc-maintain_ratio` You can see `ar-9%252D16` which is: ```javascript decodeURIComponent(decodeURIComponent('ar-9%252D16')) === 'ar-9-16' // true decodeURIComponent('ar-9%252D16') !== 'ar-9-16' // false – 'ar-9%2D16' ``` This breaks ImageKit's aspect ratio functionality. P.S. Yes, correct syntax for aspect ratio in ImageKit is dashed, not semicolon.
Activity
maybephilipp commentedon May 19, 2026
I tried to overcome this bug using transformer, but in
@unpic/sveltethis param (customtransformer) is completely ignored (https://github.com/ascorbic/unpic-img/blob/0128fb084010f30808ec334a1637bb47638ad517/packages/core/src/auto.ts#L64-L90 , https://github.com/ascorbic/unpic-img/blob/0128fb084010f30808ec334a1637bb47638ad517/packages/svelte/src/lib/source.svelte#L9).I guess, the best way is to write my own Svelte support.