如何获取LinkedIn用户200x200像素的高质量方形主头像URL
Hey there! Let me walk you through the most reliable ways to grab that better-quality 200x200 square avatar you're after, since the 100x100 one from the Basic Profile Fields isn't quite up to par.
Method 1: Modify the Existing picture-url Parameter
This is the simplest approach because you already have a starting point from the API response. The 100x100 avatar URL (from the picture-url field) follows a consistent pattern, like this:
https://media.licdn.com/dms/image/[unique-image-identifier]/profile-displayphoto-shrink_100_100/0/[additional-params]
All you need to do is replace the shrink_100_100 segment in the URL with shrink_200_200. That's it—you'll instantly get the 200x200 pixel high-quality square avatar. This works because LinkedIn uses these shrink_[width]_[height] parameters to serve resized versions of the original profile photo.
Method 2: Extract from the User's Profile Page (For Non-API Use Cases)
If you don't have access to the API and can only view the user's public profile page, you can pull the URL directly from the page source:
- Open the user's LinkedIn profile page
- Right-click anywhere on the page and select "View Page Source" (or the equivalent in your browser)
- Use the find function (Ctrl+F or Cmd+F) to search for
profile-displayphoto-shrink_200_200—the matching URL will be your 200x200 avatar.
A quick heads-up: LinkedIn occasionally updates its URL structure, so if this method stops working down the line, double-check the parameter naming in the latest avatar URLs.
内容的提问来源于stack exchange,提问作者Ofir

