URL preview image strategy - meta-tags

I'm trying to implement own URL preview service and I thought the following strategy for figuring out more or less accurate preview image was enough:
look for og:image first
if no og:image was found look for link with rel="image_src" next
if nothing found, look for first image in a body with preferrable aspect ratio, larger than assumed size (eg. > 50x50).
But looks like there are sites which don't fall in any of these rules yet still having a nice preview generated by slack or facebook. 500px is one of them - any hint where following preview images comes from?

Related

iPhone images rotate 90 degrees when using cloudinary

I use Cloudinary for my blog site (built with node js).
My problem is that when I upload an image from an iPhone, it rotates 90 degrees. I have already tried angle: "ignore" but this does not seem to work. I think it has to do with the exif information. How do I get rid of it or am I using the wrong cloudinary parameters?
(also does not work when I include a_ignore in the url)
Here is the upload code:
let result = await cloudinary.uploader.upload(req.file.path, {resource_type: type, angle:"ignore"});
I'll start by recommending to remove angle: "ignore" from the upload call parameters, try to upload again, and then you probably experience one of the following cases:
The original may not have any embedded rotation metadata and therefore there's no way to know what's the correct rotation.
The original may have the rotation metadata, and the delivery URL was of the original, which by default sends the original image, as is, without any Cloudinary processes. So far so good, however, at that point, it's up to the client/device to be responsible to parse the metadata and render it correctly by the rotation metadata, and unfortunately, there are indeed cases of clients "ignoring" the rotation metadata when rendering images.
The image was both rotated manually AND the metadata wasn't stripped, which may result in an extra (unnecessary) rotation.
After you check which case you think you might be on, here are some possible ways to fix:
For case #1 - In case you have access to the original unrotated and un-metadata-stripped version of the image, try to upload that one again instead.
For case #2 - On delivery, instead of using the original image's delivery URL, try to use a derived version of it (e.g., add q_auto to the URL as a transformation). Using any of Cloudinary's transformations will automatically optimize the image before delivery, but importantly for this case, it'll also rotate the image by the rotation metadata info (assuming it has one), and last but not least, will strip the metadata, so it'll always show the image by the intended rotation.
For case #3 - Usually a possible fix for this is to indeed add angle: "ignore", which is, as mentioned previously, recommended as a delivery transformation (a_ignore in the URL) rather than as part of the upload parameters.
If you could share the original image here, I'll be happy to take a closer look and offer solutions. If privacy is an issue, share it with Cloudinary's support team who will be happy to assist.

Chrome Web Store promotional tile Image has been rejected

I have tried (about a dozen times now) to add promotional tiles to my extension's web store listing.
I am getting this one every single time:
"This small tile image has been rejected due to the following reasons:
Text is too small
Too much detail
Please review the guidelines, upload a new image and republish."
I thought for a while that it's about text, but at my last try it was even without a single character in there and it was still rejected. Also I think the text rule is not that enforced since every single one on the front page has it's name on the tile.
Here is the last one I tried (instantly rejected this time so most likely automatic?) https://i.imgur.com/B2Qh7qO.png
Another one I tried a few days ago: https://i.imgur.com/WMcmF3O.png
Any advice would be appreciated.
The Chrome Webstore Developer support got back to me with the response
"I've checked your item and your promotional image is now fixed"
So it seems like a bug somewhere in their system so if anyone else runs into this don't do what I did and spend months trying to tweak your promotional images over and over, just contact them..
EDIT: For some reason the Developer Support contact form is extremely hard to find. Here it is: https://support.google.com/chrome_webstore/contact/developer_support?hl=en
The follow up support emails came from these address: cws-developer-support#google.com and developer-support#google.com

Does Office 365 image search work? If so, how?

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

Instagram Api Photos White lines

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

flickr api photos.search by tags or by text results show broken image

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.

Resources