Perhaps this is a bug or is intentional for some reason.
When I try to get only the asset url #{myimage.url}, the output I get is only the name of the file. But instead, I wanted the complete asset url, so the image doe not get broken. To fix that, I used the image_path() when calling the image url.