keystonejs / keystone-classic

Node.js CMS and web app framework
http://v4.keystonejs.com
MIT License
14.65k stars 2.21k forks source link

Add a parameter to the Cloudinary image link when adding it to the wysiwyg editor #4929

Open vladislav-vasilyev opened 5 years ago

vladislav-vasilyev commented 5 years ago

Hello everyone. I have a field in my model with type: Types.Html, wysiwyg: true, and I also have 'wysiwyg cloudinary images': true, in my keystone.init(). So when I'm adding a Cloudinary image to the wysiwyg editor I need to add q_auto parameter to its link automatically. For example, this is what I have now after adding an Cloudinary image to the wysiwyg editor: <img src="https://res.cloudinary.com/keystone-demo/image/upload/v1559662075/qwhnnzwrvbxawxb90lgu.png" alt="" /> What I want to have: <img src="https://res.cloudinary.com/keystone-demo/image/upload/q_auto/qwhnnzwrvbxawxb90lgu.png" alt="" /> Is it possible to set q_auto parameter automatically when a user is adding Cloudinary image to the wysiwyg editor?

Environment

Software Version
Keystone 4.0.0
Node.js 11.9.0
Browser Chrome 74.0.3729.169
laurenskling commented 5 years ago

@gautamsi , maybe you have some insights about this?

gautamsi commented 5 years ago

looks like this one is buried under the minified plugin for upload, which I do not have un-minified version. let me dig deeper.