+ 7
Get Profile Image without SoloLearn Api
Hey guys, Iâm trying to load my profile image using Javascript via the web app, but it wonât load from http://api.sololearn.com/Uploads/Avatars/userID.jpg. When opened, the link turns into another url for the actual image, and Iâm wondering if thereâs a way to directly get that url? Let me know if I need to be more clear. Thanks!
11 Answers
+ 7
Nathan Lewis have you tried using a link with CORS anywhere?
https://cors-anywhere.herokuapp.com//https://api.sololearn.com/Uploads/Avatars/6474081.jpg
+ 4
Chris C. Hahaha..đ
+ 3
Chris C. no worries! I appreciate you taking the time
+ 2
https://code.sololearn.com/WcpoC0yrlyF4/?ref=app
Chris C. if you scroll to the bottom of the setup function, youâll see:
img = loadImage(). If i put my profile picture link âhttp://api.sololearn...â in, it will not load the image. I would like to make it so that the user doesnât have to manually grab their profile image url, but rather just their profile url or user id, and it returns their profile image url without the api.sololearn
+ 2
Chris C. hey actually, I just realized it doesnât even work in p5js when using the profile image url without api.sololearn so this is a lost cause đ
+ 1
Chris C. yeah sorry I know about that I meant through javascript without needing to manually do it, thanks!
+ 1
So, after trying many different websites, I can only get images to load from imgur.com
I tried using img = createImg: That showed an image from api.sololearn and other sites but the effect didn't show.
Sorry, that I couldn't be much help.
+ 1
Qadamboy Niyazmetov hehe this post is a year old.
0
Can you share your code so I can get a better understanding?
0
I didn't give up! I think this has been solved here!
https://forum.processing.org/two/discussion/11608/i-can-t-display-images-dynamically-loaded-from-web-with-p5-js-always-a-cross-domain-issue