3 ms·
Yeah, there's a pretty easy way to do that, the entire idea of Cloudinary is you just pass the size you want in the image URL. Cloudinary isn't just image host
by mosedart 8y ago
Yeah, there's a pretty easy way to do that, the entire idea of Cloudinary is you just pass the size you want in the image URL.
Cloudinary isn't just image hosting, it's a transformation service. Take this image which you are serving at almost 4mb (!):
https://res.cloudinary.com/cinemakers/image/upload/v1544089238/profilepics/fc38c35c-f93a-11e8-b32f-5600019ed549.jpg https://res.cloudinary.com/cinemakers/image/upload/v15440892...
To display at 240x340:
https://res.cloudinary.com/cinemakers/image/upload/w_240,h_340,c_fill,g_auto/profilepics/fc38c35c-f93a-11e8-b32f-5600019ed549.jpg https://res.cloudinary.com/cinemakers/image/upload/w_240,h_3...
notice the transformations in the URL. c_fill is the "fill" crop mode, and "g_auto" stands for "auto gravity", meaning Cloudinary will find the salient features in the image and crop accordingly.
This reduces the file size under 20kb, and you should be well within your free plan limits after making these changes.