Create Thumbnail without losing image content

Hi, I am new to uploadcare but I think my use case is common, but I am struggling to achieve my goal.

I want to create thumbnail images of a company logo that is uploaded to my site with a size 0f 50X50.

I have uploaded a sample logo to uploadcare and when I add the commands to the url -/scale_crop/50x50/center/-/enhance/ it resizes the image but loses a significant part of the logo.

How do I resize the image without losing part of the logo?

Hi @milo_clarke, can you share an example?

Hi Alex



Thanks
Milo

Hello Milo. Arch here from Uploadcare.

You can try this variant that does not crop the part of logo: https://ucarecdn.com/137dfa5b-ab2d-45ba-bcb5-eb29863c9a3c/-/preview/50x50/

It won’t be big and it won’t be exactly 50x50 - but this is hard to achieve as your original logo isn’t a square either. Take a look and let me know if it works for your case or not really.

Best regards.

A better option would be combining /crop/image/1:1/ and /scale_crop/50x50/. The first operation will perform a zoom-out crop so that the whole image fits in 1:1 square. The other operation will resize the result to 50x50 pixels exactly:

https://ucarecdn.com/762e257b-507e-44f8-8b71-29fd3691d6c9/-/crop/image/1:1/-/scale_crop/50x50/

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.