How to return cropped images from Cloudinary?

I’m using Cloudinary to manage uploads and resizing for images. However the issue I’m running into is that the formats returned by default from Cloudindary do not meet my requirements, and I’d prefer to specify sizes to them which they can crop and adjust based on the size requirement?

Is this possible? Does anyone else have any suggestions for how best to handle images with Strapi?

This topic has been created from a Discord post (1237768417726038096) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord

Yes, it’s possible! With Cloudinary, you can specify custom sizes and other transformations directly through URL parameters. You can define the desired dimensions and Cloudinary will automatically adjust and crop the image as needed.

To integrate this with Strapi, you can:

  1. Use Cloudinary’s URL-based transformations to manipulate images during uploads.
  2. Customize your image upload and retrieval logic in Strapi, using the Cloudinary SDK to build the URLs dynamically based on your requirements.
  3. Alternatively, consider using plugins or middleware that simplify Cloudinary’s integration with Strapi.

This will give you flexibility in handling and delivering images while maintaining control over formats and sizes.

You can share more details if you need more help.