I am using Rails 6 ActiveStorge and MiniMagick to uplaod and resize images. Now I am trying to add a watermark to the image and am using:
<%= image_tag file.variant(draw: "image Over 0,0 10,10 '#{image_url('logo-mini.jpg')}'") %>
But the error I get is:
MiniMagick::Error (`magick convert /var/folders/2v/s0lfxd5d1lz6dhp9c4j8r8jr0000gn/T/ActiveStorage-110-20220903-1940-19jj9m8.jpeg[0] -auto-orient -draw image Over 0,0 10,10 'http://localhost:3000/assets/logo-mini-31a22ba47ac39efe669de611e397a51d52826f578ba47922492bcf2371c00b02.jpg' /var/folders/2v/s0lfxd5d1lz6dhp9c4j8r8jr0000gn/T/image_processing20220903-1940-d5ua9e.jpeg` failed with error:
convert: unable to open file `http://localhost:3000/assets/logo-mini-31a22ba47ac39efe669de611e397a51d52826f578ba47922492bcf2371c00b02.jpg' @ error/draw.c/DrawPrimitive/5616.
convert: non-conforming drawing primitive definition `image' @ error/draw.c/RenderMVGContent/4493.
I have tried all kinds of image urls, paths, https etc but always the same error. Any ideas on what might be wrong?