Skip to content

[Bug] Radius probably shouldn't be applied before cropping #234

@eportis-cloudinary

Description

@eportis-cloudinary

Bug Report

If you try to crop and apply a border radius, the radius is applied before cropping, making it invisible

Is this a regression?

No.

Steps To Reproduce the error

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

Expected behaviour

Visible border radius. This would be achieved by, e.g.:

https://res.cloudinary.com/my-cloud/image/upload/c_crop,w_800,h_600,g_auto/r_50/f_auto/q_auto/v1/my-public-id?_a=BATAXdDg0

Instead we get:

https://res.cloudinary.com/my-cloud/image/upload/r_50/c_crop,w_800,h_600,g_auto/f_auto/q_auto/v1/my-public-id?_a=BATAXdDg0

If the input image is bigger than 800x600, no border radius will be visible.

Reported by email by @tpiros

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions