How to apply a format conversion in eager chained transformations?

In order to apply the format conversion, you should use the format parameter which should be put outside of the chained transformation.
For example in Rails:

<%=
 u.cl_image_upload(:picture, :html => { multiple: true }, :use_filename => true, :eager_async => true,
  :eager => [
    { :format => 'jpg', :transformation => [
        { :crop => :fit, :height => 300, :width => 300},
        { :flags => "relative", :height => 1.0, :overlay => "my_overlay", :opacity => 60, :width => 0.8}
      ]}
  ])%>
Have more questions? Submit a request

Comments

Powered by Zendesk