I was coding for a project where image needs to uploaded and resized. I used Rails 5.2 and hence active storage. I did refer its documentation and resized the image as stated in http://edgeguides.rubyonrails.org/active_storage_overview.html#transforming-images , and to my dismay I got this error message:

MiniMagick::Error (`mogrify -resize-to-fit [100, 100] /tmp/mini_magick20180623-27536-w8k32h.jpg` failed with error:
mogrify-im6.q16: unrecognized option `-resize-to-fit' @ error/mogrify.c/MogrifyImageCommand/5885.
):

So reading the error I was able to figure out resize_to_fit was not the thing that must be used, so I checked on the internet and found that resize works, and one rather than giving:

<%= image_tag user.avatar.variant(resize_to_fit: [100, 100]) %>

can get away by modifying it as

<%= image_tag user.avatar.variant(resize: "100 x100") %>

Did any one of you face such an issue? Is there a mistake in Rails docs? I don’t know. But it definitely did not work for me.