Get user photo greater than 96px from Google Workspace API - google-api

When querying the Google Workspace API for a user, it returns the profile photo URL downsized to 96px. The URL uses the sizing parameter =s96-c which according to the image sizing docs means size 96px, cropped. However modifying this seems to only change the scale and not the resolution.
Is there any way to get / endpoint that gives a higher resolution copy of the users profile photo?

Related

Is there any way to make sure that an image is not taken from google but instead the user's phone camera?

I want to only allow images that are taken directly with the phone’s camera on my website. Are there any APIs or tricks that could help me tell if an image is authentic and taken with an iPhone or Android camera a few moments ago and not taken from Google Images.
Hi drstuggels they are a few ways to go about this.
WebRTC
To prevent upload from any file, take picture directly on your web interface, via the user webcam.
You would need to
Ask permission to the user to use the webcam.
Open the video stream
Capture on click the frame
Save the frame
This would prevent lambda users from uploading picture "not live".
If this is a solution you are considering, look for WebRTC. Although there are many blog post showcasing demo for this exact use case.
Such as:
https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API/Taking_still_photos
EXIF validation
As mentioned by iѕєρєня, you could try to access the EXIF metadata of the uploaded picture and run a validation mechanism, for let say freshness but looking for date and time field (if you are looking for a newly taken photo) or the camera model field to make sure it was taken by a camera (phone, DSLR, etc..).
DISCLAIMER:
Nothing will prevent a malicious user from tampering with the js code or file to upload fake picture.

Slack url to an image

Ive created a simple slack command that calls a rest api. The api simply returns some json with an image url.
This all works great in slack, but Ive noticed each time you view the image in slack it re-calls the image url.
This image is a live screenshot of one of our servers, if someone in slack views an old image (from a previous day) the screenshot is from now and not then.
Can this be stopped ? or am I better using webhooks ?
This is normal behavior for images URLs. Slack might cache it for some time, but it will ultimately always retrieve the newest version assuming it is the same image.
However, your image is changing over time. So while it has the same URL the content is changing.
To freeze the image at the time of the request you need to make time based snapshots and give them individual names / URLs. You can do this by creating a copy of that image each time the slash command is called and return a link to that copy. e.g. by uploading it to imgur.com or any other image server. You can also use Slack for this by the way (see this answer)

Unknown UTM campaign name using facebook pixel

I'm running ads on Facebook with additional URL parameters:
source={{site_source_name}}&placement={{placement}}&ad_id={{ad.id}}&adset_id={{adset.id}}&campaign_id={{campaign.id}}&ad_name={{ad.name}}&adset_name={{adset.name}}&campaign_name={{campaign.name}}
I've checked the preview Url and it seems that the values are filled properly.
However, I don't see any data about the ads source/campaign/ad on my pixel analytics page, everything is classified as unknown.
what am I missing?
Maybe the parameters of Facebook analytics are different from the above?
I believe the URL params are named differently, i.e. utm_source=X&utm_medium=Y&utm_campaign=Z&utm_content=W

Is it possible to get larger image size for company logos via the Linkedin API?

See the one that comes back from
https://api.linkedin.com/v1/companies/id=1337:(id,name,logo-url)
it's quite small! https://media.licdn.com/mpr/mpr/p/6/005/056/054/057ffb7.png
Would be great if could get a larger version
(note, the apigee console here may be helpful)
The information you're looking for is in the member profile field documentation on LinkedIn's developer website: https://developer.linkedin.com/docs/fields/basic-profile
picture-urls::(original)
A URL to the member's original unformatted profile picture. This
image is usually larger than the picture-url value above.

Dynamically shrink an image with Google Images API, but do not enlarge

Google provides an excellent way to resize images dynamically; simply append =sXX to the image URL. This is perfect if you want to shrink an image, but if the image is smaller than the size specified, it enlarges it, giving it a pixelated effect.
Is there an easy way to say "don't enlarge, only shrink" when using serving URLs with a specified size?
UPDATE
This functionality is now a feature request at GAE. Vote it up if you'd like to see it!
As stated in my comments above, this isn't possible.
Although I have no use of the image framework I can see how your request would be useful. May I suggest posting a Feature Request on the Google App Engines Issues BB?
After posting the request, update your StackOverflow question with a link to your Feature Request so that other users can +1 the request.
Here's the link to the GAE Issues Page. Although this is not a bug, you will need to click the New Issue button to request a feature.
What you could do is store the size of the image in the datastore so when you need the image to be a certain size, you can check in the datastore to see what size it is and add the =sXX accordingly.

Resources