Skip to content

CldImage - Support for Coordinates Based Cropping #507

@colbyfayock

Description

@colbyfayock

Discussed in #506

Originally posted by richard-chang-coder August 28, 2024
Curious question

Currently using the CldImage component I am able to crop the image but wonder is there a way to implement coordinates? When I upload the image I am also using the cropping features so when I render the image I was hoping to render the crop version where I cropped.

I know there is coordinates from the return response just wondering how can I use it.

Thanks

{
    "custom": [
        [
            28,
            7,
            63,
            63
        ]
    ]
}
<CldImage
				src={'publicId'}
				preserveTransformations
				alt="Description of my image"
				crop={{
					width: 1200,
					height: 1200,

					type: 'thumb',
					source: true,
				}}
				width="500"
				height="500"

			/>
```</div>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions