url2png image generation image address doesn't load an image
Using the cloudinary.image method here: https://cloudinary.com/documentation/url2png_website_screenshots_addon
to generate a screenshot of a page, the following is returned as a string:
<img src='http://res.cloudinary.com/rgreenstreet/image/url2png/https://rgreenstreet-yelpcamp.herokuapp.com/' signed/>
It's not returning just the address of the image, it returns the entire img element.
The img element does not display an image, and visiting the image url directly doesn't show an image either.
I feel like I'm doing something wrong here:
//project.web_url is the https://rgreenstreet-yelpcamp.herokuapp.com part of the returned image source address
-
Hi Robert,
In the logs, the error you are receiving is: "UnsignedAddonUsage: URL must be signed when using URL2PNG".
The URL you are using is not signed.
Please consider this code:
cloudinary.image("https://rgreenstreet-yelpcamp.herokuapp.com",{sign_url:true,type:'url2png'})
In response, you will receive for example: <img src=\'http://res.cloudinary.com/<cloiud_name>/image/url2png/s--s5tCsfFM--/https://rgreenstreet-yelpcamp.herokuapp.com\' />
The Cloudinary URL includes a signature component.
Please let me know if this works for you,
Best,
Michal
0 -
Thanks for the help Michal!
I played around some more with the .explicit method instead, and finally got an error that I don't have a subscription to url2png.
The documentation doesn't state anywhere that a subscription is required.
I guess that answers the question, though!
0 -
Hi Robert,
Thanks for the update. Glad it is working.
You can try the URL2PNG add-on for free (50 monthly screenshots) and later on subscribe to an add-on plan that best matches your usage requirements.
0
Post is closed for comments.
Comments
3 comments