Wanted Behavior:
Given three images with different transformations applied uniquely to each image, use waffle
and ecto-waffle
to apply these changes uniquely in my changeset. I would like something along the lines of
changeset
|> cast_attachments(attrs, [:image_1], [x1, y1])
|> cast_attachments(attrs, [:image_2], [x2, y2])
|> cast_attachments(attrs, [:image_3], [x3, y3])
Then each image gets transformed through
{:convert, "-crop #{s}x#{s}+#{x}+#{y} +repage -format png", :png}
The x and y are unique for each cast_attachments.
Current, Incorrect Behavior:
All images are transformed to the parameters of the last cast_attachments call.
Any help is much appreciated!