http://www.theverge.com/2015/7/6/8899807/instagram-1080p-pictures-photo-upload
The Verge recently made known the latest app versions of Instagram are uploading photos in 1080x1080 resolution. These photos can be easily sourced via HTML when browsing the site's source code. Can these be accessed via the official Instagram API? And if so, how?
[Update] After Mar 23, 2018
I used Ekrem Gurdal's answer to make it work:
The IG API gives you "link" attribute, e.g. https://www.instagram.com/p/BTduOwSAwN6/
Then you can append ?__a=1 to this e.g. https://www.instagram.com/p/BTduOwSAwN6/?__a=1
And you can extract from the json result where the high resolution photo is stored: graphsql.shortcode_media.display_url
E.g. https://instagram.fmnl2-1.fna.fbcdn.net/vp/f8f54b9fcb2bca69d7c73d9ffb232d64/5C324A1C/t51.2885-15/e35/18161146_397673830625587_2385146908864675840_n.jpg
Hope this helps. Maybe IG folks will also find a way to disable this in the future. Why do they not just include the hi-res photo in the API response, smh
[Update] As of Mar 23, 2018, workaround below doesn't work anymore.
Just to update anyone who's looking at this in 2018. The solution that worked for me is to remove the "vp/" on top of replacing the resolution to 1080x1080.
E.g.
https://scontent.cdninstagram.com/vp/41d5aee08758061976d26e48f45e673a/5ADA338E/t51.2885-15/s320x320/e35/20065394_1785212551507111_5192354829363576832_n.jpg
to
https://scontent.cdninstagram.com/41d5aee08758061976d26e48f45e673a/5ADA338E/t51.2885-15/s1080x1080/e35/20065394_1785212551507111_5192354829363576832_n.jpg
Not sure why you are getting down-voted, but no, that resolution is not returned by the API at the moment. However, it can be "guessed" from the other resolutions returned by the API, but that could change at any time. For example, given the standard resolution JSON:
"standard_resolution": {
"url": "https://scontent.cdninstagram.com/hphotos-xfa1/t51.2885-15/s640x640/e35/sh0.08/11370971_837216559694773_771634899_n.jpg",
"width": 640,
"height": 640
}
Remove the size part (s640x640 here) and the two paths that follows (e35/sh0.08 for this picture, likely different for yours) to end up with the URL to the 1080x1080:
https://scontent.cdninstagram.com/hphotos-xfa1/t51.2885-15/11370971_837216559694773_771634899_n.jpg
This has worked since that resolution was activated on my account. But again, I would just wait for the API.
As of 26th March 2018, Instagram changed their links.
Here's a working solution to get 1080x1080 resolution images from API.
Get the user_Id from https://www.instagram.com/{username}/?__a=1.
Paste the user_id in this link https://i.instagram.com/api/v1/users/{user_id}/info/.
Get the hd url link from hd_profile_pic_url_info. :)
I noticed that simply removing the size part, the biggest image is returned:
https://scontent.cdninstagram.com/hphotos-xfa1/t51.2885-15/s640x640/e35/sh0.08/11370971_837216559694773_771634899_n.jpg
to
https://scontent.cdninstagram.com/hphotos-xfa1/t51.2885-15/e35/sh0.08/11370971_837216559694773_771634899_n.jpg
Hence this should do the trick:
var hightUrl = data.images.standard_resolution.url.replace("/s640x640/","/");
You can simply fetch 1080p image if available by using this url:
https://www.instagram.com/p/['IMAGE-CODE']/?__a=1
The problem with instagram image URL's is that the URL signatures provided in the json responses expire after some time. My workaround for this problem is as follows:
Steps:
1. Get the instagram post link. Eg : https://www.instagram.com/p/Bo-Jru-g7Wa/
or if you don't have the link, the instagram api provides you with a permalink(image-code) option in the result array which for the above link is Bo-Jru-g7Wa
Now just add media?size=l after the url ie.,
Result: High quality image url:
https://www.instagram.com/p/Bo-Jru-g7Wa/media?size=l
you can see it in action here: https://jsfiddle.net/nmj1z7wo/fiddle URL
This link can be considered as a shorthand code to instagram image URL's which are very much bigger. Supported values for size are t (thumbnail), m (medium), l (large). Defaults to m.
This works as of 20th March 2018.
Remove the vp and the size parts.
So if we have a 150x150 image here
https://scontent.cdninstagram.com/vp/6f28b299faab04675a936073c94d0fde/5B2E3498/t51.2885-15/s150x150/e35/c135.0.810.810/28152308_875888592619569_7505395194448052224_n.jpg
Remove /vp and /s150x150 to get
https://scontent.cdninstagram.com/6f28b299faab04675a936073c94d0fde/5B2E3498/t51.2885-15/e35/c135.0.810.810/28152308_875888592619569_7505395194448052224_n.jpg
And we can get the 1080 image
here
You can even just leave the last two segments
https://scontent.cdninstagram.com/e35/28152308_875888592619569_7505395194448052224_n.jpg
which can be seen here
Hope this helps
This worked for me today (15 August 2018) for most public images. I think, because people use different apps to upload images, the API may show different sizes but the links are to the same default resolution file.
Go to the user's page: https://www.instagram.com/username
Click on the image you want and the URL bar will change to: https://www.instagram.com/p/image-code/?taken-by=username
Copy the image-code from the URL
Go to: https://www.instagram.com/p/image-code/?__a=1
Scan through the JSON file (it helps to have a JSON viewer extension enabled) and click on the highest resolution image to download it. For example:
I'm unsure whether it's possible to get a 1080p resolution image. But here is one way to get an image with 320x320 resolution.
1) Enter the username of the user in the following URL. Here I'm using simonsterstrength as username.
https://www.instagram.com/simonsterstrength/?__a=1
2) Search for "profile_pic_url_hd" and copy the URL and access the picture that IG calls it as HD.
Note: As of June-2020, the response from IG CDN is OK.
You received
"standard_resolution": {
"url": "https://scontent.cdninstagram.com/hphotos-xfa1/t51.2885-15/s640x640/e35/sh0.08/11370971_837216559694773_771634899_n.jpg",
"width": 640,
"height": 640
}
It's possible to replace s640x640 with s1080x1080 or 2048x2048. Both this request return image with resolut 1080x1080
var hightUrl = data.images.standard_resolution.url.replace("s640x640","s1080x1080");
Related
I want to use the REST Google Photos API to download original photos or videos from Goolge Photos, and I found there is no way to achieve it with the "baseUrl".
I have checked the following pages, but there is not a definitive answer:
https://issuetracker.google.com/issues/112096115
https://issuetracker.google.com/issues/80149160
So if there is indeed a way to get the original photos and videos or if there will be one?
The addition of '=d' will not give you the original file! I tested it. The quality and resolution of the image seems to match the original one, but some information like exif metadata (geo location) is missing. As a result, the file size is also smaller than the original. This makes is not usable for backup synchronization where I want the original file.
Actually, I expect from google that they give me automated access to my own original data. It looks like that is currently not the case.
I'm afraid there are currently only two options how to get the original fotos:
Manual download on Google Fotos
Manual download via Google Takeout
Very disappointing!
So I just read through the issue tracker answers you provided, and I noticed that one reply was to add '=d'to the baseUrl.
So example: GET https://lh3.googleusercontent.com/lr/AGb3...HG2n=d
According to Microsoft ("Image Analysis" in https://techcommunity.microsoft.com/t5/Microsoft-SharePoint-Blog/Enrich-your-SharePoint-Content-with-Intelligence-and-Automation/ba-p/194174, from May 21, 2018), we should be able to search for text within images.
Is this working for you/anyone? If so, I would like to know what you had to do to get it to work.
I have a SharePoint modern team site with PNG images that contain clearly readable text...but search will not find anything. I have requested re-indexing.
I have had a Microsoft Support request (#10638094) open since June 27 with this question/issue, and no one--even after escalation--has been able to answer it.
Based on the article above, it appears that "MediaService" column(s) should be added to the library to support this; however, I can find no such columns in the environment (using PnP export to review).
Naomi Moneypenny and Kathrine Hammervold highlighted this functionality at Ignite 2017 (https://channel9.msdn.com/Events/Ignite/Microsoft-Ignite-Orlando-2017/BRK2181, about 27:00), but it doesn't seem to be available/working (at least not for me).
August 24: So, after research, digging yet further, I have an escalated support ticket at Microsoft (#10638094, unsolved) and there are conversations at https://techcommunity.microsoft.com/t5/Intelligent-Search-Discovery/Search-for-words-in-your-images-in-Office-365/ba-p/135703, https://techcommunity.microsoft.com/t5/Microsoft-SharePoint-Blog/Enrich-your-SharePoint-Content-with-Intelligence-and-Automation/bc-p/236625, and Does Office 365 image search work? If so, how?. I have yet to hear of this functionality working for anyone. I will keep digging, and I will certainly post if I hear anything. J
After some digging, from official it seems already released at the end of 2017. However there is no any related doc or official guide to this Text in image search function.
The 2 way i can think of perform text in image search.
Perform OCR yourself on the image before uploading the image and embed the text in image metadata.
Use support image type like IIRC and TIF that image are recognized.
In your case, you can upload the image and have another column that contains text and apply metadata to the image in a list/ library column.
OneDrive in another hand also has this function. For example, search for things like "cat" and it * should* pull up most pictures you have of cats. Its more likely using tag as label for the image instead of reading the picture it self.
Also, i believe OneNote has its index recognizable text and handwriting. Maybe this can point you to the right directions.
*Microsoft Azure's computer Vision offer service to recognized text in image. Maybe this can help.
"Is this working for you/anyone?" Yes, I responded to this post elsewhere and see it posted here, as well. Unfortunately, I cannot tell you HOW to get it to work or to verify that it is correctly configured. I can only suggest a test for you to see if it is working for you, as it works for me. I have not tested every way in which it could or should work. I have only discovered it working with PNGs I inserted into Wiki Pages in SharePoint Online. Those PNGs are generated using Snag-It to take Screen Captures and I do not see where Snag-It would be doing any OCR on the image to embed anything, etc. OCR is not even in the Snag-It help file, so I believe the PNG files are just simple PNGs. I insert them into the SharePoint Wiki page, which uploads them to the Site Assets library. And, when I search for a word in the image, the image is returned as a result - not the Wiki page. So, suggest you try a simple test of just inserting a PNG with text in it into a Wiki Page and give the index a bit of time to run to see if it works for you.
It seems like the functionality has matured recently. I have been testing it more thoroughly, and I have documented the results in my blog at http://www.collaboration-foundry.com/SharePointImageAnalysis.
Bottom line: It works for me in OneDrive and SharePoint (modern and classis), but I've only seen it work on the out-of-the-box Document content type--which limits custom solutions somewhat.
It's cool functionality when it works. Looking forward to seeing Microsoft build on this.
John
I am trying to fetch user photos from instagram api.
The url i am querying is:
https://api.instagram.com/v1/users/self/media/recent?access_token={access_token}
Note that i am only using access token and there's no need to register my app. I only want to get user photos. The thing is It returns original images and not the square ones. Why? All I want to do is to get all photos in the same size, but it returns original sizes.I tried standard_resolution and every solution I met but finally, There's more than I thought. Photos even have white lines which is disgusting to be shown on my website.
P.S. I want to get all photos ,all of them in the same sizes and without any white lines. Guys,i know instagram so often changes these kind of things,but maybe you've found the solution to my problem.
The Instagram url in standard resolution is always square:
https://scontent.cdninstagram.com/t51.2885-15/s640x640/sh0.08/e35/20759276_1125417337622604_960083034999095296_n.jpg
If you want to get the original image from this then use (changing url pattern):
https://scontent.cdninstagram.com/t51.2885-15/20759276_1125417337622604_960083034999095296_n.jpg
Some image which is not having 640 resolution than the standard resolution introduces white line.
in that case to get the original square image we need to go lower than 640x640
This is the url pattern for 320x320:
https://scontent.cdninstagram.com/t51.2885-15/s320x320/e35/20759276_1125417337622604_960083034999095296_n.jpg
for my job, I'm looking into an idea in which people would use Google Search by Image and use any celebrity photo they find. Google would return the results and then on our end, a there'd be a database of professionals showing how to get that specific look.
I'm assuming this is extremely unlikely to do, based on that users could use ANY photo.
So, is there a way that I could have about 100 or so celebrity photos that Google Image results could compare to and then choose the one that is closest.
Basically:
Drag drop photo of Britney Spears
Google searches with that image
Google's results compare the top images with our 100, and selects the closest match.
User gets to see video of how to get Britney Spears look.
I'm not a programmer, but looking for some API or Search by Image extension that could make this remotely possible for the programmers here at my job. Does something like that (a search by image api) exist? The best I could find was just the support page, which is hardly of any help: http://support.google.com/images/bin/answer.py?hl=en&p=searchbyimagepage&answer=1325808
You can easily search by an existing image by inserting this into your address bar:
https://www.google.com/searchbyimage?site=search&sa=X&image_url=YOUR_IMAGE_URL
Example:
https://www.google.com/searchbyimage?site=search&sa=X&image_url=http://cdn.sstatic.net/Sites/stackoverflow/company/img/logos/so/so-icon.png
Sorry to say, but the Google image API is deprecated:
Important: The Google Image Search API has been officially deprecated as of May 26, 2011. It will continue to work as per our deprecation policy, but the number of requests you may make per day may be limited.
Quite sure there are some alternatives (http://www.tineye.com/ and http://mrisa.mage.me.uk)
Update (2013): There is now Google Custom Search which allows image searches.
These answers are quite obsolete, but the question comes up in searches. So, the Google Vision API has the "web detection" feature that does a reverse image search. First 1000 requests per month are free, $3.50/1000 afterwards.
I think Google Web Detection could be a solution for you. Google moved it permanently from Image search
You can do it via www.images.google.com but only from a browser (lets you upload your own image and compares it to similar).
I'm working on doing it from code (not from browser).
I had the same problem and came up with two solutions:
There are a number of APIs that give reverse image search results nowadays. The ones I used are https://reverseimageapi.com and TinEye.com.
As the selected answer mentions, you can easily scrape this information but will almost certainly need rotating proxies to prevent being banned by the search engine. There are plenty of proxy rotation services (Zyte, Oxylabs, ScrapingBee, etc.) to make you life easier.
I ended up going with option 1 due to the upkeep of scraping search engines and elements changing / breaking.
I have a question:
for some reason when I do search on flickr either by tags or by text and I receive the results , I try to show them as a small image on my html , although I receive 500 results about 1-3 of them are shown as a broken image the rest are fine.but when I click on the "broken image" it does send me over to the correct Image at the flickr site
(every image is also a link to the original location in flickr.com and the link works well).
what can be the reason? is it a well known bug ?
Thanks
Mary
This is a bit of a kludge, but if the images are not broken, you can attach an onError event to them and re-load them at that time. It might provoke the broken ones to "fix" themselves.