This is a function that can be used as a plugin in a Yext account for uploading and transforming images via the Cloudinary Eager Transform API.
Prerequistes:
- Yext Account
- Cloudinary Account
- Clone this repo
- Add your Cloudinary API Key and Secret to a
.env
file to test locally. - To change the type of transform you want to apply to an image, you can modify the following line in
mod.ts
with different Cloudinary Transformations:
const eager = "f_png,e_bgremoval";
- To test the transform function, you can change the following line in
test.ts
:
const testInput = "beer_60|https://a.mktgcdn.com/p-sandbox/rrK5bxcoVAgkGckDnA7GlhyC1VOpV6eEf4KjjlFumQs/400x600.jpg";
After running the test, you can copy and paste the new URL that will be logged to the terminal in the browser to see the transformed image.
This guide demonstrates how to develop functions locally using Deno and how to then upload them to a Yext account as a plugin.