+ 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!

26th Jun 2019, 1:14 AM
Nathan Lewis
Nathan Lewis - avatar
11 Respuestas
26th Jun 2019, 4:53 PM
Burey
Burey - avatar
+ 4
Chris C. Hahaha..😁
22nd Oct 2020, 8:27 AM
Programmer ツ
Programmer ツ - avatar
+ 3
Chris C. no worries! I appreciate you taking the time
26th Jun 2019, 4:06 PM
Nathan Lewis
Nathan Lewis - avatar
+ 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
26th Jun 2019, 2:57 PM
Nathan Lewis
Nathan Lewis - avatar
+ 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 🙃
26th Jun 2019, 3:00 PM
Nathan Lewis
Nathan Lewis - avatar
+ 1
Chris C. yeah sorry I know about that I meant through javascript without needing to manually do it, thanks!
26th Jun 2019, 2:50 AM
Nathan Lewis
Nathan Lewis - avatar
+ 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.
26th Jun 2019, 4:05 PM
Chris Coder
Chris Coder - avatar
21st Oct 2020, 2:18 PM
Qadamboy Niyazmetov
Qadamboy Niyazmetov - avatar
+ 1
Qadamboy Niyazmetov hehe this post is a year old.
21st Oct 2020, 2:40 PM
Chris Coder
Chris Coder - avatar
0
Can you share your code so I can get a better understanding?
26th Jun 2019, 2:52 PM
Chris Coder
Chris Coder - avatar