How to save cropped version of image - VIDEO?

Hi,

Are you able to provide a video on how to do this? I can’t seem to figure it out. My cropped images aren’t coming up with a CDN URL.

In relation to previous post:
"When you crop an image, the widget uploads an original image and you receive a CDN URL with crop operation applied. If you want to save cropped image instead, you will need to turn off the “auto store” option in your project settings. In this case, all uploaded files will be removed in 24 hours. When you receive a CDN URL with crop operation you need to send a REST API 4 request (POST /files/) to store this file and set received CDN URL as a source:

curl -X POST \
-H “Authorization: Uploadcare.Simple demopublickey:demoprivatekey” \
-d “source=https://ucarecdn.com/3a75edda-e631-4b62-96fd-06fbe3ce534a/-/crop/168x137/30,11/-/preview/” \
-d “store=true” \
https://api.uploadcare.com/files/
Note that you’ll need to provide your API keys instead of demo keys. In the response, you’ll get a new CDN URL.

A cropped image is saved, the original image will be removed after 24 hours."

Hi @INL_magnets, Could you share more details about the workflow you’re building? Also, how are you currently accessing the file URL after it’s uploaded? Understanding your setup will help us suggest the best approach!

Hi, I’m needing users to upload an image, and then crop that image to a specific size before submitting.

I’m currently accessing the (uncropped) uploaded image on Uploadcare Workspace.

The crop tool in the file uploader doesn’t actually crop the image, as it relies on the CDN URL API.

How it works: The original image is uploaded and stored in your project. The API returns a URL of the image, and the uploader library generates a new URL by adding the crop operation with parameters calculated from the user’s input. In your app, you can access the final URL that includes the crop operation and store it in your DB/CMS, allowing you to retrieve the cropped variant later. You don’t have to store the cropped version as a separate file in your project, since you can access it via the respective CDN URL.

If you have a specific need for storing a cropped variant, could you share more details about that?