Following Google’s shutdown of its legacy Google+ API in March 2019, the Google+ (gplus) option is no longer available.
Following changes made by Instagram in June 2020, the Instagram (instagram_name) option is no longer available.
Many modern web and mobile applications include integral social aspects as parts of their online solution.
Users can sign-in to these services and be identified by their chosen social identity. This is made quite straightforward by leveraging single sign-on services such as Facebook Connect, Twitter, Google+ and others. After signing in, activities in the service and user generated content can be accompanied with the real name of the users as well as their profile pictures.
In order to display a user’s social profile picture in your web site, you’ll need to support all the different APIs provided by the relevant social network, each with its own quirks. You’ll then probably want to fetch the profile picture to your local server. After that, you’ll want to modify the picture to match your graphic design’s dimensions and aspect ratio requirements, apply the relevant transformations (applying circular crops, sharpening, etc.), and remember to update the images on your side when users update their profile pictures on the social network.
Overall, a lot of small things to take care of.
Fortunately, Cloudinary already does all that for you. Simply specify the social profile name or ID using Cloudinary’s dynamic image URLs and you’re done. Cloudinary contacts the social network and automatically fetches the profile picture that best matches your display requirements. It then transforms the image on-the-fly to match your graphic design, delivers the image optimized and cached through a fast CDN and refreshes the image periodically in case it was changes on the social network.
This blog post details how you can embed social pictures from Google+ and Instagram, our latest additions to Cloudinary’s list of supported social networks (adding to Facebook, Twitter and Gravatar).
Every Instagram user has a unique public user name and a main profile picture. If you know that a piece of content on your site was contributed by a certain Instagram user, you can use Cloudinary’s delivery URLs to fetch and display their main profile picture side-by-side with their added content.
The following example fetches the profile picture of ‘angelinajolieofficial’ while transforming it to fill a 120×120 rectangle, optimizes it and delivers it through a CDN.
In the example above, the original Instagram profile picture was displayed while reducing its original dimensions. You can apply any Cloudinary transformation on-the-fly to match the look & feel of your application on any desktop, mobile or retina display. The following example generates a 90×90 circular crop thumbnail of the same photo. Automatic face detection was used to correctly crop the original image. In addition, an automatic image improvement filter was applied on the generated thumbnail.
You can apply any Cloudinary image transformation on the image. The following example generate a 150×150 face-detection based circular thumbnail while increasing the fill light of the resulting image and changing its colors to be more blueish.
When generating rounded corners or circular images, you might want the background of the image to be transparent. This will allow you to place the image over a background image or pattern. To do that, just tell Cloudinary to convert the image format on-the-fly to the PNG format that supports transparent background (alpha channel).
In addition to user profile pictures, Google+ (as well as Facebook) also maintains profile pictures of companies, products and figures. You can use the same ‘gplus‘ image type to transform and deliver pictures of these additional Google+ pages as well. The following example delivers the picture of Google’s Google+ page while scaling it to 100 pixels width, rotating by 30 degrees and applying a grayscale effect. This time, using the name of this page ‘+google’.
While all code samples above rendered an HTML image tag on the server-side, you can use Cloudinary’s jQuery plugin to dynamically embed social profile pictures from your client-side code on the browser side. Here’s a jQuery example:
Many of Cloudinary’s customers already use Cloudinary to fetch, transform and deliver Facebook and Twitter profile pictures in their web and mobile sites and apps. Now you have the same simple integration available for both Google+ and Instagram. We hope you enjoy using these new features as well.
Profile picture delivery of all supported social networks is included in any of our plans. Try it out now.
If your website has slow-loading images, visitors are more likely to click off, increasing bounce rates and negatively impacting search engine ranking. Read how you can optimize, transform, and deliver your images with Cloudinary to improve user engagement and site performance. Getting Started With Cloudinary To get started, we’ll need…