Cloudinary offers a number of APIs for image manipulation and transformation, enabling dynamic resizing, optimization, cropping, and converting on the fly. The Cloudinary block lets you execute any number of image manipulations while in-motion over the PubNub network. For example, you may have a collaborative app, and when images are shared, you may automatically want to crop and change the file type. With the Cloudinary block, this processing of the image takes place in real time, before the image reaches its subscriber.
Use the predefined block to create easy image transformations using the Cloudinary API.
Highlights: – Dynamically adapt image properties — dimensions, crop, format, quality — and deliver an optimal version to every user, based on the image content and viewing context. – Easily apply a variety of image manipulations, such as overlays, watermarks, artistic filters, rotations, modified shapes and much more. – Seamlessly integrate Cloudinary with your application back-end using client-side integration libraries and SDKs for your development platform of choice: Ruby on Rails, PHP, Node.js, Angular, .Net, Python & Django, jQuery, Java, Scala, Android, iOS and more.
For images that are stored on Cloudinary, use the “upload” directive and supply optional transformations. Input Channel: cloudinary-input
{ "transformations": [ "w_150", "h_150" ], "image": "myImage.jpg", "cloudName": "<Cloudinary Cloud Name>", "operation": "upload", "resource": "image" }
For images that are stored on other websites, use the “fetch” directive and supply optional transformations. Input Channel: cloudinary-input
{ "transformations": [ "w_150", "h_150" ], "image": "http://i.imgur.com/LcPmYfzr.jpg", "cloudName": "<Cloudinary Cloud Name>", "operation": "fetch", "resource": "image" }
The Block adds the revised Cloudinary image URL into the message payload
{ "cloudinaryLink": <Link to cloudinary URL>, }
Need help? Contact PubNub Support.
Copyright (c) 2018 PubNub
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.