cloudinary-community / cloudinary-community/cloudinary-util

[Bug] `url-loader` ignores `height` option when crop mode is "limit"

Open
#231 1 comment 0 reactions 1 assignee Claimed by @eportis-cloudinary View on GitHub
Dominant language
TypeScript
Stars
14
Forks
23
PR merge metrics
No merged PRs in 30d

Description

# **Bug Report**

## **Describe the bug**

The `url-loader` removes the height when the crop mode is set to `limit`. Therefore, it ignores the `height` portion of the "limit" transformation and only enforces a width limit.

**Relevant code reference:**
https://github.com/cloudinary-community/cloudinary-util/blob/6f966dad3ef375c5f9de2710760129582bd9cc82/packages/url-loader/src/plugins/cropping.ts#L227-L229

## **Steps To Reproduce the error**

```ts
const url = constructCloudinaryUrl({
options: {
src: 'my-public-id',
width: 800,
height: 600
},
config: {
cloud: {
cloudName: 'my-cloud'
}
}
});
```

## **Expected behaviour**

I expect the url to have a `h_600` param

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.