prawn - import image from URL

Viewed 6525

I can't seem to figure out how to import an image from an url

To import the images from my localhost I use:

image"./assets/images/img.png"

When I replace the path with an URL it says

`image' : URL not found

Is there a solution for this, or should I create a def that downloads the image and to use the path it returns?

2 Answers

I got this working for me:

image open("https://driver.mbpgroup.eu/images/mbp_logo.jpg"), position: :right, width: 250

I could NOT get this to work for me (Prawn documentation):

image "https://driver.mbpgroup.eu/images/mbp_logo.jpg", position: :right, width: 250
Related