Topic-icon Avatar image size from Facebook

Active Subscriptions:

None
9 years 6 months ago #47670 by matgray87
Hi,
How do I increase the image size of the avatar imported from Facebook?
At the moment, in K2, my user avatar settings are set to 800x800px, so everything is stretching to those dimensions, but the images imported seem to be pretty tiny, as they're terribly pixelated...
Thanks,
Matt
The topic has been locked.
Support Specialist
9 years 6 months ago #47675 by mel
Replied by mel on topic Avatar image size from Facebook
Matt,

Right now we don't have the greatest way to do that from the backend component, but for now you can edit the following file to change the dimensions.

In components/com_jfbconnect/libraries/profile/facebook.php around line 214, you will see the following two lines of code where you can change the 300 to 800:
$width = $params->get('width', 300);
$height = $params->get('height', 300);

Please note, that not all Facebook profile pictures are going to be that large, so you may still get some pixelation, but this can get you closer. I will also put a task in for our next release to be able to set this easier from the backend, instead of needing to edit code.

Thanks
-Melissa
The topic has been locked.
Active Subscriptions:

None
9 years 6 months ago #47698 by matgray87
Hi,
I've changed this, but it's still bringing in a small photo unfortunately...?
Cheers
The topic has been locked.
Support Specialist
9 years 6 months ago #47706 by mel
Replied by mel on topic Avatar image size from Facebook
That's strange. I made the same change on my site and the picture that came in looked fine with no pixelation. Here are some things to try:

1) Verify in Facebook that your profile picture actually has dimensions that are 800x800 or greater. If not, upload a newer higher-res picture to test with.
2) In Components > JFBConnect > Configuration > General Tab, set the 'Cache Duration' to 0.
3) On Components > JFBConnect > Profiles > K2 tab, set 'Always Import Profile Data' and 'Import Avatar' to yes.
4) Log out on your front end and re-login with the Facebook account you're testing with.
5) Re-check the K2 item on the front-end and see if the avatar looks ok.
The topic has been locked.
Active Subscriptions:

None
9 years 6 months ago #47817 by matgray87
Thanks... maybe it just is because of the quality of the source image... not sure.
I noticed you added a user, and your image was also pixelated... was your original over 800px?
Thanks,
Matt
The topic has been locked.
Support Specialist
9 years 6 months ago #47818 by mel
Replied by mel on topic Avatar image size from Facebook
The test that I mentioned above that I performed for setting the size to 800x800 was not on sourcecoast.com, but on a test site on my localhost. If you're referring to my profile image on the sc forums, that was imported from LinkedIn, not Facebook, and the original size was small (like 200x200).
The topic has been locked.